diff --git a/openspec/changes/home-document/.openspec.yaml b/openspec/changes/archive/2026-07-31-home-document/.openspec.yaml similarity index 100% rename from openspec/changes/home-document/.openspec.yaml rename to openspec/changes/archive/2026-07-31-home-document/.openspec.yaml diff --git a/openspec/changes/home-document/design.md b/openspec/changes/archive/2026-07-31-home-document/design.md similarity index 100% rename from openspec/changes/home-document/design.md rename to openspec/changes/archive/2026-07-31-home-document/design.md diff --git a/openspec/changes/home-document/proposal.md b/openspec/changes/archive/2026-07-31-home-document/proposal.md similarity index 100% rename from openspec/changes/home-document/proposal.md rename to openspec/changes/archive/2026-07-31-home-document/proposal.md diff --git a/openspec/changes/home-document/specs/app-chrome/spec.md b/openspec/changes/archive/2026-07-31-home-document/specs/app-chrome/spec.md similarity index 100% rename from openspec/changes/home-document/specs/app-chrome/spec.md rename to openspec/changes/archive/2026-07-31-home-document/specs/app-chrome/spec.md diff --git a/openspec/changes/home-document/specs/graph-navigation/spec.md b/openspec/changes/archive/2026-07-31-home-document/specs/graph-navigation/spec.md similarity index 100% rename from openspec/changes/home-document/specs/graph-navigation/spec.md rename to openspec/changes/archive/2026-07-31-home-document/specs/graph-navigation/spec.md diff --git a/openspec/changes/home-document/specs/home-document/spec.md b/openspec/changes/archive/2026-07-31-home-document/specs/home-document/spec.md similarity index 100% rename from openspec/changes/home-document/specs/home-document/spec.md rename to openspec/changes/archive/2026-07-31-home-document/specs/home-document/spec.md diff --git a/openspec/changes/home-document/specs/journal/spec.md b/openspec/changes/archive/2026-07-31-home-document/specs/journal/spec.md similarity index 100% rename from openspec/changes/home-document/specs/journal/spec.md rename to openspec/changes/archive/2026-07-31-home-document/specs/journal/spec.md diff --git a/openspec/changes/home-document/tasks.md b/openspec/changes/archive/2026-07-31-home-document/tasks.md similarity index 100% rename from openspec/changes/home-document/tasks.md rename to openspec/changes/archive/2026-07-31-home-document/tasks.md diff --git a/openspec/specs/app-chrome/spec.md b/openspec/specs/app-chrome/spec.md index f3b0d4a..75ecd04 100644 --- a/openspec/specs/app-chrome/spec.md +++ b/openspec/specs/app-chrome/spec.md @@ -20,6 +20,25 @@ double-click to maximize/restore) MUST keep working. titlebar, and the caption controls minimize, maximize/restore, and close the window +### Requirement: Home and Journal header controls +The header/titlebar row SHALL present a Journal control that always +navigates to the journal timeline, and a Home control that navigates to the +designated home document. The Home control SHALL only be shown while a home +document is designated — with the journal as home the two controls would +share a destination, so the Journal control carries it alone. These replace +the previous Calendar button; the calendar SHALL remain reachable via the +sidebar and its keyboard shortcut. + +#### Scenario: Journal always one click away +- **WHEN** a home document is designated and the user clicks the Journal + header control +- **THEN** the journal timeline opens + +#### Scenario: Home appears with designation +- **WHEN** no home document is designated +- **THEN** only the Journal control is shown; designating a home document + makes the Home control appear, and clearing the designation removes it + ### Requirement: Collapsible right sidebar hosting panels The application SHALL provide a right-hand sidebar that hosts named panels — initially the calendar picker and the Similar-blocks panel — and SHALL be @@ -28,7 +47,8 @@ row and a keyboard shortcut, and resizable by dragging its edge within clamped bounds. The toggle icon MUST reflect the sidebar's current state (collapsed vs. expanded). Collapsing the sidebar MUST NOT discard panel state. Sidebar visibility and width SHALL be remembered for at least the -duration of the session. +duration of the session. The sidebar SHALL end in a footer containing a +Settings button that opens the Settings screen. #### Scenario: Panels live in the sidebar - **WHEN** the sidebar is open with a block focused @@ -41,7 +61,12 @@ duration of the session. panels intact, without moving editor focus #### Scenario: Calendar invocation targets the sidebar -- **WHEN** the user invokes the calendar (shortcut or button) while the - sidebar is collapsed +- **WHEN** the user invokes the calendar shortcut while the sidebar is + collapsed - **THEN** the sidebar opens revealing the calendar panel, and day selection navigates to (or creates) that day's journal page exactly as before + +#### Scenario: Settings lives in the footer +- **WHEN** the sidebar is open +- **THEN** a footer row at the bottom of the sidebar shows a Settings button, + and clicking it opens the Settings screen in the main column diff --git a/openspec/specs/graph-navigation/spec.md b/openspec/specs/graph-navigation/spec.md index 21caa1c..80fb837 100644 --- a/openspec/specs/graph-navigation/spec.md +++ b/openspec/specs/graph-navigation/spec.md @@ -40,3 +40,14 @@ The system SHALL provide a keyboard-invoked switcher that fuzzy-matches page and #### Scenario: Jump by name fragment - **WHEN** the user invokes quick open and types `trawl` - **THEN** nodes whose names fuzzy-match (e.g., `trawler-design`) are listed, and confirming navigates to the selected node + +### Requirement: Home and Journal navigation actions +The system SHALL provide a keyboard-bound Go-Home action (default `ctrl-h`) that navigates to the designated home document — the journal timeline when none is designated — and a Journal navigation action invocable from the header. Both SHALL push onto navigation history like any other navigation, and the Settings screen SHALL participate in history the same way. + +#### Scenario: Go home from anywhere +- **WHEN** the user presses `ctrl-h` while viewing an arbitrary page +- **THEN** the view navigates to the home document, and navigate-back returns to the prior page + +#### Scenario: Settings is a history entry +- **WHEN** the user opens Settings, navigates to the journal via the Journal control, and invokes navigate-back twice +- **THEN** the view returns first to Settings, then to whatever preceded it diff --git a/openspec/specs/home-document/spec.md b/openspec/specs/home-document/spec.md new file mode 100644 index 0000000..863d0f5 --- /dev/null +++ b/openspec/specs/home-document/spec.md @@ -0,0 +1,54 @@ +# home-document Specification + +## Purpose + +Designating a node as the graph's home document — what the app opens to and +where the Home control goes — plus the Settings screen that manages the +designation. The journal timeline remains the default when nothing is +designated. + +## Requirements + +### Requirement: Home document designation +The system SHALL allow designating exactly one node — a page (tree root) or a tag — as the graph's home document, stored in the Loro document as a single last-write-wins value. An absent value SHALL mean the journal timeline is the home. The designation SHALL persist across relaunches and travel with the graph. + +#### Scenario: Home survives relaunch +- **WHEN** the user sets a page as the home document and relaunches the application +- **THEN** the application opens on that page + +#### Scenario: Tag as home +- **WHEN** the user sets the tag `#inbox` as the home document and relaunches +- **THEN** the application opens on the `#inbox` tag view (header plus backlinks), exactly as if navigated to + +### Requirement: Startup honors the home document +On startup the application SHALL open the designated home document; with no designation it SHALL open the journal timeline exactly as before. Opening a non-journal home SHALL NOT auto-focus any block. + +#### Scenario: Unset home preserves today's behavior +- **WHEN** the application starts with no home document designated +- **THEN** the journal timeline opens with today's page focused in its first block, identical to the pre-change behavior + +#### Scenario: Pinned home opens unfocused +- **WHEN** the application starts with a page designated as home +- **THEN** that page is displayed with no block focused and no editor attached + +### Requirement: Deleted home falls back and clears +If the designated home is a tree node that no longer exists, resolving the home (at startup or via the Home action) SHALL open the journal timeline and clear the stored designation. + +#### Scenario: Home node was deleted +- **WHEN** the application starts and the designated home page has been deleted from the graph +- **THEN** the journal timeline opens, and the Settings screen subsequently shows the home as "Journal (default)" + +### Requirement: Settings screen +The application SHALL provide a Settings screen rendered as a full main-column view that participates in navigation history, opened from a Settings button in a sidebar footer. It SHALL show the current home document and allow changing it via a combobox-style type-to-refine picker over pages and tags, including a "Journal (default)" option that clears the designation. + +#### Scenario: Open settings and set home +- **WHEN** the user clicks the sidebar footer's Settings button, opens the home picker, and selects a page +- **THEN** the Settings screen shows that page as the home document, and the change is persisted + +#### Scenario: Settings participates in history +- **WHEN** the user opens Settings from a page and invokes navigate-back +- **THEN** the view returns to that page + +#### Scenario: Unset reads as default +- **WHEN** the user opens Settings on a graph with no home designated +- **THEN** the home setting displays "Journal (default)" rather than an empty or error state diff --git a/openspec/specs/journal/spec.md b/openspec/specs/journal/spec.md index 5789075..cbf629d 100644 --- a/openspec/specs/journal/spec.md +++ b/openspec/specs/journal/spec.md @@ -2,28 +2,36 @@ ## Purpose -Daily notes: automatic date pages, date references, and the journal timeline as the application's home view. +Daily notes: automatic date pages, date references, and the journal timeline as the application's default home view. ## Requirements ### Requirement: Automatic daily pages -The system SHALL ensure a journal page exists for the current local date whenever the application opens or the date rolls over while running. Journal pages SHALL be ordinary page nodes distinguished by a date attribute, created lazily and never duplicated. +The system SHALL ensure a journal page exists for the current local date whenever the journal timeline is opened, or the date rolls over while the journal timeline is displayed. Journal pages SHALL be ordinary page nodes distinguished by a date attribute, created lazily and never duplicated. Days on which the journal timeline was never displayed SHALL NOT accumulate journal pages. -#### Scenario: First launch of the day -- **WHEN** the application opens on a date with no existing journal page -- **THEN** a journal page for that date exists and is focused with an empty first block ready for input +#### Scenario: First journal visit of the day +- **WHEN** the journal timeline is opened on a date with no existing journal page +- **THEN** a journal page for that date exists in the timeline #### Scenario: No empty-page litter - **WHEN** a journal page was auto-created but never received content - **THEN** it is not shown in the timeline on subsequent days -### Requirement: Journal timeline is the home view -The application SHALL open to a chronological timeline with today's journal page at the top and previous non-empty journal pages loading below it as the user scrolls. +#### Scenario: Unvisited days create nothing +- **WHEN** the application runs for several days with a non-journal home document and the journal timeline is never opened +- **THEN** no journal pages exist for those days + +### Requirement: Journal timeline is the default home view +The application SHALL open to a chronological timeline with today's journal page at the top and previous non-empty journal pages loading below it as the user scrolls, unless a home document is designated (see the home-document capability), in which case the timeline remains reachable via the Journal header control and renders identically when visited. #### Scenario: Opening the app -- **WHEN** the application starts +- **WHEN** the application starts with no home document designated - **THEN** today's journal page is displayed with focus in its first block, and scrolling down reveals prior days in reverse-chronological order +#### Scenario: Timeline unchanged when reached from a home document +- **WHEN** a home document is designated and the user invokes the Journal header control +- **THEN** the journal timeline renders with today's page at the top exactly as it does at startup without a home document + ### Requirement: Date references resolve to journal pages Date references in block content SHALL be node references to the corresponding journal page, participating in backlinks like any other reference. Typing support SHALL make date references cheap to produce (e.g., a date picker or natural-language completion).