Reading library
A React block (a whole screen) in Beamline's AI workspace app.
A read-it-later library: saved views that are live filters (a query with every unreadable part named, the number that matches now, saved with a name; a document that matches later joins by itself and renaming moves nothing), feeds in folders that overlap (a grid of feeds against folders; leaving one folder keeps the feed subscribed with its articles), the open document with tags for the whole document kept apart from each highlight's (a highlight whose place in the text is gone says so and can't be tagged in place), and reading prompts by scope (document, passage, word) and trigger. A manual prompt never runs on import; an import prompt that tags may only add tags already in the list, and what it answered beyond them is reported, never added. The prompt editor keeps a draft apart from the saved prompt, checks its variables against its scope, resets to the default and previews with the open document without calling a model.
Use it for
- A read-it-later or research library with saved filters, feeds in folders, highlights and AI reading prompts.
- Any library where saved views must stay live filters rather than copies.
Not for
- Writing notes from a session (session-notes).
- A report archive with versions and owners (report-library).
Anatomy
- rail: Library with Add a document; Inbox, Later, Archive with counts; Views with their live counts and New view; Feeds by folder (a folder's feeds, an empty folder said, feeds not updating or paused said) with Organize
- list: the filter in code type, its parts read back as chips and each unreadable part named, the number that matches now, the view's name and purpose with Save; what the view means (live, never a copy); the matching documents with kind, title, writer, site, minutes, tags and how far read
- reader: the open document with its own tags and Tag document; the text with highlights marked; each highlight with its own tags and Tag (a lost place said); the tag popover says whether it tags the whole document or this highlight only, finds or creates a tag
- prompts: by scope (Whole document, A passage you select, A single word), each prompt's trigger (When you ask, On every import), where the answer goes, Built in, its switch; a scope this document can't give said
- prompt editor: Runs, Answer goes to, Model; the prompt with its problems; Insert variables of this scope; Reset to default; the tags contract for a tagging prompt; Preview with the open document (no model called); Cancel and Save
- organize feeds: the feeds against the folders with ticks, each feed's subscription and last update, in no folder or in several, a new folder starting empty, Save folders
- import report: what each import prompt added, the tags it answered outside the list (not added), and how many manual prompts didn't run
States
- editing a filter, an unreadable filter (each part named, nothing run), the preview count, nothing matches, an unsaved view, a saved view (live), the view not saved (kept for Try again)
- a document's tags, a highlight's tags, an existing tag, a new tag created, saving, not saved (choice and quote kept for Try again), a highlight whose place is gone
- a feed in no folder, a new folder, a feed in several folders, an empty folder, the folders not saved (kept)
- a prompt off, a manual prompt on, an import prompt on, a scope this document can't give, a template with unknown or other-scope variables or an unclosed brace, reset to default, saved, not saved (draft kept)
- an import: import prompts ran, tags outside the list refused, manual prompts skipped, the import failing
- narrow room: rail, list and reader stack
Keyboard
- Tab reaches each highlight in the text; Enter or Space picks it
- Enter in New folder name adds the folder
Motion
Rows and tabs ease their colour on hover and choice. Nothing runs at rest.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
documents | ReadingDocument[] | — | |
defaultDocuments | ReadingDocument[] | — | |
onDocumentsChange | ((documents: ReadingDocument[]) => void) | — | |
tags | Tag[] | — | |
defaultTags | Tag[] | — | |
onTagsChange | ((tags: Tag[]) => void) | — | |
feeds | Feed[] | — | |
folders | FeedFolder[] | — | |
defaultFolders | FeedFolder[] | — | |
onFoldersChange | ((folders: FeedFolder[]) => void) | — | |
views | ReadingView[] | — | |
defaultViews | ReadingView[] | — | |
onViewsChange | ((views: ReadingView[]) => void) | — | |
prompts | ReadingPrompt[] | — | |
defaultPrompts | ReadingPrompt[] | — | |
onPromptsChange | ((prompts: ReadingPrompt[]) => void) | — | |
models | PromptModel[] | — | |
unavailableScopes | PromptScope[] | — | Scopes the open document can't give a prompt ("passage" for a scanned PDF): their prompts say so. |
onSaveView | ((view: ReadingView) => Promise<unknown>) | — | Saves a new or renamed view; reject to say it wasn't saved (the draft stays). |
onSaveFolders | ((folders: FeedFolder[]) => Promise<unknown>) | — | Saves folder membership; reject to put the folders back with the reason. |
onTag | ((target: TagTarget, tagIds: string[]) => Promise<unknown>) | — | Saves a document's or a highlight's tags; reject to keep the choice for Try again. |
onCreateTag | ((name: string) => Promise<Tag>) | — | Creates a tag; resolve with it. |
onSavePrompt | ((prompt: ReadingPrompt) => Promise<unknown>) | — | Saves a prompt (switched, edited); reject to keep the draft and say why. |
onImport | (() => Promise<ReadingDocument>) | — | Brings in a document (a save from the web, a new feed item). Import prompts then run on it. |
onRunPrompt | ((prompt: ReadingPrompt, document: ReadingDocument) => Promise<PromptRun>) | — | Runs an import prompt on a new document; its answer is screened before anything is applied. |
defaultViewId | string | null | — | |
defaultQuery | string | — | The filter shown first when no view is chosen. |
defaultDocumentId | string | null | — | |
defaultPanel | "document" | "prompts" | — | |
now | string | — | "Now" for saved<7d. |
locale | string | — | |
className | string | — | Classes on the documented visual root; no override by default. |
style | CSSProperties | — | Inline styles on the documented visual root; no overrides by default. |
ref | Ref<HTMLDivElement> | — | Receives the documented native target or imperative handle; omitted by default. |
Built from
- input
- button
- popover
- search-field
- checkbox
- switch
- dialog
- textarea
- select
- segmented-control
- model-picker
Dependencies
lucide-react
Import
import { ReadingLibrary } from "@beamline/reading-library";
Get it
Reading library is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent
More in AI workspace
- AI agent workspace: Threads, a conversation that opens on the thread's earlier turns (each with its trace, the tools the agent called, a cited answer and any table it…
- Agent runs monitor: Every run of your agents in one place: success rate, run time, tokens and spend; the last runs as a strip of status blocks; a live table where running…
- Agent monitor: Agents in production and on test. Monitor shows every agent or one over 24 hours, 7 or 14 days: runs, tokens, estimated cost and average run time counted…
- Conversation history: Past conversations with an assistant, ready to pick up again: the list by day with bookmarks and unsent drafts, a search through every message that…
- Knowledge base manager: What your assistant knows and whether it is fresh: sources with live sync status (syncing with progress, out of date, failed with the reason and Retry)…
- Artifact workbench: Where the things an assistant makes are checked before they leave: every document, piece of code, small app and data result from a conversation, each…
- AI image studio: Write a prompt, pick a shape, a style and how many, and watch the variations generate side by side; each one opens full screen and can be upscaled or…
- Voice agent: A voice agent in three layouts on one session: a workspace with the agent's orb large on a stage (the line being said shows under it, questions to ask…
- Model playground: Try one prompt on up to three models side by side: pick each model with its price and speed in view, set the system prompt, temperature and length once…
- Model inspector: A design model's objects without needing the 3D view: the model tree, where objects with the same name are told apart by id and path; the selected…
- Model issues: Issues pinned to the objects of a design model. The queue says the scope beside every count (open in the project, on the loaded models, on this version)…
- Agent builder: An agent's configuration beside an assistant that proposes tools. Ask for what the agent should do and the assistant's proposal lists each tool with why…
- Workflow composer: A workflow drafted from a sentence and finished by hand. The prompt drafts steps that arrive one by one on the graph (a draft cut short keeps what came…
- Data binding: Bind an object's properties to a view model. Each property says whether it is bound, incomplete or mismatched. A binding takes its source from the…