Repository navigation
Refactor renderer state: tabs as views, page state split, writes without tabs - #10
Merged
Merged
Conversation
Page kinds are now editable, paper, annotation and feed; the renderer only creates editable pages. Date, start, end, status and priority become ordinary attributes created once with each new workspace. A new status attribute type groups options into incomplete and complete; any status attribute in the complete group mutes the page's reminders. The calendar and overview read pages by attribute instead of kind, through a new hasValue page query. Removes unused exports, files, components, aliases, test-only service functions and four unused Tiptap dependencies. Adds knip with a CI step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each tab now saves only its id and a view (type plus params). A view registry declares each type's component, title, history source and whether it stays mounted when hidden. Tab titles are derived from the params, so page tabs follow the page's current title. The library, paper library, pinned and trash tabs become one library view whose scope, page kind, sort, tags and attribute filters are saved params. The calendar reads its date, start and status attributes from params and gets a date-attribute selector; the overview counts the incomplete group of its status attribute. Missing referenced pages or attributes show a notice with a re-pick instead of dropping the tab. Restoring checks each view with typia and drops only invalid tabs; a broken layout falls back to the default layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split the page state module by responsibility: confirmation dialogs, the per-page edit buffer and autosave, page session registry, tab visit sync and write tracking. Behaviour is unchanged. Writes no longer carry a tab id. Each write states where the user did it (a page or the workspace) and may carry a write id that the change notification echoes, so the editor recognises its own saves in either arrival order. The renderer waits for all in-flight writes when entering or closing a tab or quitting. Sidebar and command writes go to the workspace history; undo follows focus: editor -> that page, a tab group -> its active view, sidebar or elsewhere -> workspace. Undo is linear: a new write drops that history's redo references, and the redo branch pickers are gone. The main process no longer changes user-editable data after a network wait. A new attachments module downloads any file type, streams it to disk with an idle timeout and no size cap, and returns the attachment id; the caller attaches it with a normal write. Handed-out attachments are protected from cleanup until referenced. Network feed operations are not tracked as writes, so they no longer lock tabs. Also: tab titles re-read only when the title block changes, the calendar picks status options by group, and view titles live in the view registry only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renderer-state phase of the bottom-up refactor, in three commits.
Cleanup (225fdf3)
Tabs as view renders (9884744)
Page state and writes (448b0b5)
Checks run locally
pnpm typecheck,pnpm lint(0 errors, existing 47 warnings),pnpm knip,pnpm db:checkpnpm test:db(5 + 235),pnpm test:feed(45)pnpm perfwithin absolute and relative thresholds (run by Codex on the host)🤖 Generated with Claude Code