Repository navigation
Description
Problem
Requiring users to select a directory before entering the reader asks them to
organize their resources before they have experienced the product. Readers often
discover and add relevant material gradually.
The application should let users start reading immediately and postpone directory
write permissions until they explicitly save their work.
Intended flow
- Open the application directly into the reading interface.
- Start with a small set of sample documents and lightweight inline guidance.
- Add individual files or folders from the same interface whenever needed.
- Read, ask questions, and take notes while drafts save automatically in IndexedDB.
- Choose “Save to folder” to write reading records to local files.
Adding resources must not reset the current conversation or require restarting
the workspace.
Workspace and resources
- A workspace exists independently of any local directory.
- It can contain sample documents, individually selected files, and folders.
- Keep “Add files” and “Add folder” available in the main interface.
- Request only read access when adding resources.
- Read and process original documents on demand; do not copy or upload entire
directories automatically. - Selecting a file does not grant access to its parent directory.
- Original documents remain unchanged.
Drafts and explicit saving
- Automatically persist conversations, notes, and reading progress in IndexedDB.
- Agent-created or updated notes modify the browser draft.
- Users choose the save destination independently of the source resources.
- On the first “Save to folder” action, select a destination and request write
access. Write reading records under its.gamma-reader/directory. - Later changes continue to save in IndexedDB. Update external files only when
the user explicitly saves again. - Existing write permission does not enable automatic filesystem writes.
- Cancelling or denying write permission leaves the browser draft available.
Distinguish “Saved in this browser” from “Saved to folder.” After further changes,
make it clear that the folder copy has not been updated. Report success only when
the corresponding persistence operation completes.
Clearing site data removes browser drafts but does not delete files already saved
to a local folder. Remembered resource handles may require renewed read permission.
Choosing a save destination does not implicitly authorize the agent to read its
contents as source material.
Product baseline
Gamma Reader is a lightweight, free AI reading companion for ordinary users.
No login, registration, local service installation, or user-supplied model key
is required. The initial target is desktop Chrome and Edge.
Use Gamma Compose's frontend + Node architecture and browser-side Pi agent, with
Increa Reader as the reading interaction reference. The main interface provides
resources, a reading area, and AI assistance. Users can collect selections, ask
about visible content, switch documents without resetting a conversation, and
create or reopen conversations.
| Format | Intended support |
|---|---|
| In-app reading, text selection, region text extraction, and notes. AI text analysis requires a text layer; no OCR initially. | |
| HTML | Lightweight sandboxed iframe preview. Scripts are isolated from the host, with no same-origin access or directory handles. External networking is blocked by default; local resources require authorization. |
| Common images | In-app preview and zoom; no AI image understanding initially. |
| Markdown | In-app reading, selection-based questions, notes, and agent access. |
| Code and plain text | In-app reading, selection-based questions, and agent access. |
Word .docx |
Local content extraction for agent context and analysis; no in-app preview or editing. |
Legacy Word .doc |
Not supported initially. |
Users view Word documents externally. The reader cannot observe the current page
or selection in Word. Word references use file names, headings, and excerpts,
without claiming page-number fidelity.
The agent may search and read authorized workspace resources as needed, prioritizing
explicit selections and the current document. Tool activity shows the accessed
sources. The agent has no local shell or arbitrary filesystem access. Note tools
modify drafts, not original documents or arbitrary conversation state.
Privacy and isolation
The frontend owns the Pi agent, local tools, document processing, and workspace
state. Node serves the application and proxies model requests without persisting
document or conversation bodies. This also applies to proxy logs and error monitoring.
Questions, necessary context, and tool results pass through Node and the model
provider. This is not end-to-end encryption or a promise that all content remains
on the device. Provider retention depends on the selected service.
Workspaces have independent agent instances, context, and drafts. Node does not
share transcripts or agent sessions between users. A shared server-side model
credential does not share conversation context.
Without accounts, isolation follows browser workspaces and local access, not
verified human identities. People sharing the same browser profile can access its
drafts; people with access to saved files can access those records. Browser storage
and local files do not imply encryption at rest.
Document rendering must preserve these boundaries: sanitize converted HTML, isolate
executable previews, and prevent automatic loading of document-provided external
resources.
Acceptance criteria
- First-time users can read a sample without selecting a directory.
- Guidance is available inline without a mandatory setup wizard.
- Files and folders can be added progressively in the main interface.
- Adding resources requests read access only and preserves the conversation.
- Successfully persisted drafts survive a page reload.
- No external directory writes occur before an explicit save action.
- Users can save reading records to a destination separate from their sources.
- Cancelled or failed saves preserve drafts and show accurate save status.
- Further edits do not silently update the previously saved folder.
- Original documents remain unchanged.
- Agent context stays within the current workspace's authorized resources.
Scope and documentation
This issue records agreed product behavior, not already implemented features.
The repository currently contains the application scaffold. Detailed layout,
storage schemas, and implementation sequencing remain separate design decisions.
Accounts, billing, quotas, rate limiting, cloud synchronization, collaborative
editing, original-document editing, OCR, AI image understanding, high-fidelity
PDF-to-Markdown conversion, executable .board support, and local model installation
are outside the initial scope.
Keep product discussions and scope in GitHub Issues rather than a repository
product-scope or iteration document. Retain README development and running
instructions. All project code, comments, documentation, and application copy
must be in English.
Activity