diff --git a/openspec/changes/pinned-sidebar/.openspec.yaml b/openspec/changes/archive/2026-07-31-pinned-sidebar/.openspec.yaml similarity index 100% rename from openspec/changes/pinned-sidebar/.openspec.yaml rename to openspec/changes/archive/2026-07-31-pinned-sidebar/.openspec.yaml diff --git a/openspec/changes/pinned-sidebar/design.md b/openspec/changes/archive/2026-07-31-pinned-sidebar/design.md similarity index 100% rename from openspec/changes/pinned-sidebar/design.md rename to openspec/changes/archive/2026-07-31-pinned-sidebar/design.md diff --git a/openspec/changes/pinned-sidebar/proposal.md b/openspec/changes/archive/2026-07-31-pinned-sidebar/proposal.md similarity index 100% rename from openspec/changes/pinned-sidebar/proposal.md rename to openspec/changes/archive/2026-07-31-pinned-sidebar/proposal.md diff --git a/openspec/changes/pinned-sidebar/specs/app-chrome/spec.md b/openspec/changes/archive/2026-07-31-pinned-sidebar/specs/app-chrome/spec.md similarity index 100% rename from openspec/changes/pinned-sidebar/specs/app-chrome/spec.md rename to openspec/changes/archive/2026-07-31-pinned-sidebar/specs/app-chrome/spec.md diff --git a/openspec/changes/pinned-sidebar/specs/pinned-nodes/spec.md b/openspec/changes/archive/2026-07-31-pinned-sidebar/specs/pinned-nodes/spec.md similarity index 100% rename from openspec/changes/pinned-sidebar/specs/pinned-nodes/spec.md rename to openspec/changes/archive/2026-07-31-pinned-sidebar/specs/pinned-nodes/spec.md diff --git a/openspec/changes/pinned-sidebar/tasks.md b/openspec/changes/archive/2026-07-31-pinned-sidebar/tasks.md similarity index 100% rename from openspec/changes/pinned-sidebar/tasks.md rename to openspec/changes/archive/2026-07-31-pinned-sidebar/tasks.md diff --git a/openspec/specs/app-chrome/spec.md b/openspec/specs/app-chrome/spec.md index 75ecd04..6f8d638 100644 --- a/openspec/specs/app-chrome/spec.md +++ b/openspec/specs/app-chrome/spec.md @@ -41,19 +41,20 @@ sidebar and its keyboard shortcut. ### 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 -collapsible via a dedicated sidebar-toggle icon button in the header/titlebar -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. The sidebar SHALL end in a footer containing a -Settings button that opens the Settings screen. +the calendar picker, the Pinned panel, and the Similar-blocks panel, in that +order — and SHALL be collapsible via a dedicated sidebar-toggle icon button +in the header/titlebar 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. 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 -- **THEN** the calendar and the Similar-blocks list render as sidebar panels, - and the Similar panel no longer renders at the bottom of the outline +- **THEN** the calendar, the Pinned panel, and the Similar-blocks list render + as sidebar panels in that order, and the Similar panel no longer renders at + the bottom of the outline #### Scenario: Toggle from the keyboard - **WHEN** the user presses the sidebar toggle shortcut twice diff --git a/openspec/specs/pinned-nodes/spec.md b/openspec/specs/pinned-nodes/spec.md new file mode 100644 index 0000000..96acaab --- /dev/null +++ b/openspec/specs/pinned-nodes/spec.md @@ -0,0 +1,50 @@ +# pinned-nodes Specification + +## Purpose + +A graph-persisted set of waypoints: pinned nodes surfaced in a sidebar +panel, managed through the node context menu — distinct from the single +home document. + +## Requirements + +### Requirement: Pinned list is graph state +The system SHALL maintain an ordered list of pinned nodes (pages, blocks, or tags) in the Loro document, persisting across relaunches and traveling with the graph. Pinning SHALL append to the list; unpinning SHALL remove the entry. A pinned tree node that no longer exists SHALL be dropped from the list when it is loaded. Duplicate entries (e.g. from concurrent pinning) SHALL be deduplicated on load, keeping the first occurrence. + +#### Scenario: Pins survive relaunch in order +- **WHEN** the user pins page A, then tag `#inbox`, then page B, and relaunches +- **THEN** the Pinned panel lists A, `#inbox`, B in that order + +#### Scenario: Deleted node's pin disappears +- **WHEN** a pinned page is deleted from the graph +- **THEN** the Pinned panel no longer shows it after the list next loads, without error + +### Requirement: Pinned sidebar panel +The sidebar SHALL host a Pinned panel between the Calendar and Similar panels, listing each pinned node by display name. Clicking a row SHALL navigate to that node (pushing navigation history). An empty list SHALL render a placeholder line in the style of the Similar panel's empty state. + +#### Scenario: One click to a pinned tag +- **WHEN** `#inbox` is pinned and the user clicks its Pinned panel row from any view +- **THEN** the `#inbox` tag view opens, and navigate-back returns to the prior view + +#### Scenario: Empty state +- **WHEN** nothing is pinned +- **THEN** the Pinned panel shows a placeholder line (e.g. "Nothing pinned yet") rather than disappearing + +#### Scenario: Rename reflects immediately +- **WHEN** a pinned page is renamed +- **THEN** its Pinned panel row shows the new name (pins store node identity, not names) + +### Requirement: Context menu manages pins +The system SHALL open a context menu on right-click of an outline bullet, a page heading, or a Pinned panel row, offering exactly one pin action for that node: "Pin to sidebar" when unpinned, "Unpin" when pinned. The menu SHALL dismiss on selection, on escape, and on any click outside it, and at most one menu SHALL be open at a time. + +#### Scenario: Pin from the outline +- **WHEN** the user right-clicks a page heading and selects "Pin to sidebar" +- **THEN** the menu closes and the page appears at the end of the Pinned panel + +#### Scenario: Unpin from the panel +- **WHEN** the user right-clicks a Pinned panel row and selects "Unpin" +- **THEN** the row disappears from the panel and the node's outline context menu offers "Pin to sidebar" again + +#### Scenario: Dismiss without action +- **WHEN** the user right-clicks a bullet and then clicks elsewhere or presses escape +- **THEN** the menu closes and nothing is pinned