Skip to content

Commit 5d1b0bb

Browse files
authored
Merge pull request #22 from hauntedfail/refine/ui-routing-refresh
docs: define task 18-alpha UI refresh workflow
2 parents b421a28 + b4956a0 commit 5d1b0bb

90 files changed

Lines changed: 6764 additions & 1097 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/architecture/ui-and-routing.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ used by right-panel flashback shortcuts.
6060

6161
Each flashback row shows the source memory title, muted prefix context,
6262
flashbacked text, and muted suffix context. The visual treatment should feel
63-
close to a GitHub pull request file-review view: dense rows, quote-focused
64-
content, clear source labels, and no full article rendering.
63+
close to a GitHub pull request file-review view: dense rows, selected text as
64+
the focal content, muted surrounding context, subordinate source metadata, and
65+
no full article rendering.
6566

66-
Clicking the source title or quote opens `/memories/:id` at the corresponding
67+
Clicking the row content or source title opens `/memories/:id` at the corresponding
6768
flashback anchor.
6869

6970
## Responsive Behavior

docs/references/design-system/components-and-surfaces.md

Lines changed: 69 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ Button shape follows the job:
4949
Use icons inside buttons when an icon exists. Do not replace familiar icon
5050
actions with verbose text-only controls.
5151

52+
Read-status controls on memory cards and reader pages are icon-only action
53+
buttons. They keep accessible labels on the button. Open eye means unread
54+
(`read: false`), and closed eye means read (`read: true`).
55+
5256
Paper themes add one deliberate material exception for archive actions:
5357

54-
- Add-memory commands and List/Grid view toggles use the
55-
`trauma-paper-wax-seal` treatment.
58+
- Add-memory commands use the `trauma-paper-wax-seal` treatment.
5659
- Do not replace theme colours inside this treatment. The button's existing
5760
semantic background, text, border, hover, and `aria-pressed` classes stay in
5861
charge of colour.
@@ -74,22 +77,31 @@ Paper themes add one deliberate material exception for archive actions:
7477

7578
## Browse Header
7679

77-
The Memories browse header owns the list/grid view toggle. Keep the title block
78-
and view toggle in one two-column grid row at every route width:
79-
80-
- Title/eyebrow column: `minmax(0, 1fr)` so it can shrink.
81-
- View mode column: `auto`, aligned to the inline end.
82-
- Do not let phone layout push List/Grid below the `Memories` title.
83-
- The shared narrow-route header container query can stack other route headers,
84-
but `MemoryBrowse` uses its own header marker to remain a single row.
80+
The Memories browse header owns the read-state tabs, not a large route title
81+
or list/grid toggle.
82+
83+
- Render exactly three equal-width tabs: `All`, `Unread`, and `Read`.
84+
- `All` is the default state and removes read-state tokens from the search
85+
query.
86+
- `Unread` appends the standalone `unread` search token.
87+
- `Read` appends the standalone `read` search token.
88+
- The search bar and URL remain the source of truth for the filter state.
89+
- The active tab uses bold primary text plus a short rounded accent underline
90+
anchored to the tab bottom. Inactive tabs use muted text.
91+
- The tab strip stays in one sticky row at every route width.
92+
- These tabs are not wax controls. Paper/Hermès wax treatment remains reserved
93+
for archive commands such as Add memory.
8594

8695
## Shell Popovers
8796

8897
Left-rail transient controls open as anchored popovers rather than global
8998
drawers:
9099

91-
- Theme settings and Add memory composer use the same `role="dialog"` popup
92-
pattern, `aria-haspopup="dialog"`, `aria-expanded`, and `aria-controls`.
100+
- Theme settings and Add memory composer use the shared `Popup` shell with
101+
`role="dialog"`, `aria-haspopup`, `aria-expanded`, and `aria-controls`.
102+
- General action menus use the same `Popup` shell with `role="menu"`. Memory,
103+
Moment, and Flashback delete actions use one danger menu-item treatment and
104+
the shared trash icon.
93105
- Popovers close on Escape, outside pointer interaction, or successful
94106
completion of the contained workflow.
95107
- Add memory keeps the shell-level command globally reachable, but the composer
@@ -110,8 +122,25 @@ Inputs use semantic surfaces:
110122
Search inputs:
111123

112124
- The browse route owns the memory search field.
125+
- The focus indicator belongs to the rounded search surface itself, using an
126+
inset ring so focus corners follow the search bar shape.
113127
- The right rail does not contain a search field.
114128

129+
## Taxonomy Rendering
130+
131+
Use `TaxonomyList` for category/tag chips and right-rail taxonomy filters.
132+
133+
- `mode="chips"` renders attached categories/tags on memory rows and reader
134+
intros, and the same chip styling is also used for right-rail category/tag
135+
filters.
136+
- Use `density="compact"` for right-rail chip lists when the section needs
137+
tighter item spacing than memory-row metadata.
138+
- Selectable chips use `aria-pressed` for active right-rail filters.
139+
- `mode="filters"` remains available for full-width taxonomy controls, but the
140+
current shell does not use it for the right rail.
141+
- Parents own route/query state; taxonomy rendering components do not know
142+
browse query keys.
143+
115144
## Memory Browse Rows
116145

117146
Memory rows are the primary archive scanning surface.
@@ -136,19 +165,24 @@ Grid mode reuses the same content and adds:
136165

137166
## Flashback Excerpts
138167

139-
`FlashbackExcerpt` is the shared excerpt component for browse cards and the
140-
canonical `/flashbacks` view.
168+
`FlashbackInlineText` is the shared text primitive for right-rail Flashback
169+
shortcuts and the canonical `/flashbacks` view. `FlashbackExcerpt` is only a
170+
thin browse-card wrapper around the same primitive.
141171

142172
Contract:
143173

144-
- Rounded quote block.
145-
- Left border uses `border-trauma-quote-bar`.
146-
- Background uses `bg-trauma-quote-bg`.
147-
- Text uses `text-trauma-quote-ink`.
148-
- Flashback text uses `mark` with `bg-trauma-flashback-bg`.
174+
- Prefix and suffix context render around the selected Flashback text.
175+
- Context uses theme secondary/tertiary foreground tokens plus the shared
176+
Flashback context blur/mask treatment, so it stays visibly lower contrast
177+
than the selected text. The blur belongs to the prefix/suffix text spans, not
178+
to the whole Flashback card, list, or right-rail island.
179+
- The selected Flashback string uses normal primary readable contrast and a
180+
semantic `mark` element without becoming a separate highlighter badge.
149181
- Optional link wraps the whole excerpt.
150182

151-
Do not hand-roll separate flashback quote treatments for each route.
183+
Do not hand-roll separate Flashback text treatments for each route. `/flashbacks`
184+
uses dense route rows: shared inline Flashback text first, then the source
185+
memory title as small supplemental metadata at the bottom.
152186

153187
## Right Rail Sections
154188

@@ -167,17 +201,21 @@ route content containers. Contextual route content must stay small enough to
167201
act as a right rail aid rather than a second main pane.
168202

169203
When an island contains an unbounded list, the list body must be a bounded
170-
scroll region. This is required for Flashback shortcut lists and reader TOC. Do not
171-
let those islands grow vertically for every item.
172-
173-
Reader TOC should make overflow discoverable. When its bounded list can still
174-
scroll in a direction, show a low-contrast blur fade on that edge only. The
175-
fade should make the edge entries look slightly hazy, not like a heavy shadow
176-
or spotlight. Use neutral black in the fade recipe, not the primary/accent
177-
colour. The top fade must start at the scroll body edge so text cannot appear
178-
unblurred between the TOC heading and the fade. Use CSS gradients and masks to
179-
soften the fade boundary; do not use JavaScript to paint the effect. Do not
180-
render a fade for a direction that is not currently scrollable.
204+
scroll region. This is required for Flashback shortcut lists and reader TOC. Do
205+
not let those islands grow vertically for every item.
206+
207+
Reader TOC should make overflow discoverable. When the bounded TOC can still
208+
scroll in a direction, show a low-contrast blur fade on that edge only. The fade
209+
should make the edge entries look slightly hazy, not like a heavy shadow or
210+
spotlight. Use neutral black in the fade recipe, not the primary/accent colour.
211+
The top fade must start at the scroll body edge so text cannot appear unblurred
212+
between the heading and the fade. Use CSS gradients and masks to soften the fade
213+
boundary. Do not render a fade for a direction that is not currently scrollable.
214+
215+
Flashback shortcut lists do not use TOC scroll-edge overlays. Their focal
216+
treatment is per Flashback item: selected text remains normal and readable,
217+
while the stored prefix/suffix context uses the shared Flashback context
218+
blur/mask classes.
181219

182220
## Add Memory Composer
183221

docs/references/design-system/interaction-and-accessibility.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ Canonical UI routes:
66

77
- `/memories`
88
- `/flashbacks`
9+
- `/moments`
910
- `/memories/:id`
11+
- `/settings`
1012

1113
The root route redirects to `/memories`.
1214

13-
Do not add live navigation links to missing `/category`, `/tags`, `/backup`,
14-
or `/settings` routes. Future items may be rendered as disabled controls only.
15+
Do not add live navigation links to missing `/category`, `/tags`, or `/backup`
16+
routes. Future items may be rendered as disabled controls only.
1517

1618
## Query State
1719

@@ -28,14 +30,29 @@ Supported browse concerns:
2830
Filter buttons should toggle their own query key without clearing unrelated
2931
query state.
3032

33+
The `q` search value is preserved as raw input in the URL and may contain
34+
fielded filters:
35+
36+
- `title:{some title}`
37+
- `url:{example.com}`
38+
- `tag:{sqlite}`
39+
- `category:{research}`
40+
- `flashback:{selected text}`
41+
- standalone `read` or `unread`
42+
43+
Field filters, free-text terms, read-state filters, and explicit right-rail
44+
filters combine with AND semantics. `read unread` intentionally matches no
45+
rows.
46+
3147
## Row Navigation
3248

3349
Memory browse rows are full-row links.
3450

3551
Rules:
3652

3753
- The entire row/card opens the memory.
38-
- Nested controls should be avoided inside the row.
54+
- Nested controls must stop propagation so action buttons do not trigger row
55+
navigation.
3956
- There is no separate trailing `Open` button.
4057
- Keyboard focus must reach the row link.
4158

@@ -86,8 +103,9 @@ Route surfaces should use `aria-labelledby` and stable headings:
86103
- `memories-title`.
87104
- `flashbacks-title`.
88105
- Reader fallback states use `reader-state-title`; ready reader content uses
89-
the markdown heading from the stored content rather than a duplicate shell
90-
header title.
106+
a route-local sticky header with only the back control and `Memory` label.
107+
The memory URL/action row, title, and taxonomy chips live in the main reader
108+
intro.
91109

92110
## Selected And Disabled State
93111

docs/references/design-system/layout-and-shell.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Current islands:
171171

172172
- Categories.
173173
- Tags.
174-
- Flashback.
174+
- Flashbacks.
175175

176176
Route-specific content may be inserted above these browse filters when a route
177177
has a strong contextual aid. The current example is the reader table of
@@ -262,5 +262,5 @@ Reader image contract:
262262
Route frame classes belong to the route surface, not the shell. The shell owns
263263
columns, global navigation, bottom phone tabs, global composer popover state,
264264
and the right rail slot. Route files own
265-
headers, search controls, list/grid mode, empty states, reader content, and
265+
headers, search controls, read-state tabs, empty states, reader content, and
266266
route-specific loading states.

docs/references/design-system/reader-and-content.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ Contract:
4949
- Text is compact.
5050
- Links target generated markdown heading anchors and use the reader link
5151
token on hover.
52+
- Heading entries are left-aligned inside the island. Do not add global list
53+
padding; reserve only the small Moment affordance slot and use heading-level
54+
indentation for hierarchy.
5255
- Heading links live inside a bounded scroll body so many headings do not expand
5356
the right rail or the whole app layout.
5457
- When the bounded TOC body can scroll further, show a subtle blur fade only on
@@ -98,7 +101,8 @@ Visual contract:
98101
Keep this target treatment in the reader scope rather than as a generic mark
99102
rule.
100103

101-
Flashback excerpts use `FlashbackExcerpt`, not the reader prose mark style.
104+
Flashback browse excerpts and right-rail shortcuts use the shared
105+
`FlashbackInlineText` primitive, not the reader prose mark style.
102106

103107
## Flashback Interaction
104108

docs/references/design-system/tokens-and-themes.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,12 @@ Reader links, flashbacks, and flashback excerpts use stable semantic tokens:
177177

178178
- Inline flashbacks: `bg-trauma-flashback-bg`,
179179
`text-trauma-flashback-ink`.
180-
- Quote/excerpt cards: `bg-trauma-quote-bg`,
181-
`border-trauma-quote-bar`, `text-trauma-quote-ink`.
180+
- Flashback browse context: shared context spans use secondary/tertiary
181+
foreground mixing and the Flashback context blur/mask classes. Route and
182+
right-rail Flashback rows should not use quote-card background or border
183+
tokens.
184+
- Reader prose blockquotes still use the quote token family through the reader
185+
prose styles.
182186
- Linked flashback hash targets:
183187
`.trauma-reader-content mark[data-flashback-id]:target` uses
184188
`anchor-flashback-bg`, `anchor-flashback-ink`, and

docs/references/design-system/verification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ Check:
113113
- Phone `Primary tabs` render every rail item and use tab-bar-only horizontal
114114
scrolling when constrained.
115115
- Phone tab labels are visually hidden while role names remain available.
116-
- On phone, Memories List/Grid view controls stay on the right edge of the
117-
`Memories` header row instead of wrapping below the title.
116+
- On phone, Memories read-state tabs stay as one sticky equal-width header row
117+
and the obsolete List/Grid view controls are absent.
118118
- Tablet uses the compact icon rail and does not duplicate brand/filter header
119119
chrome.
120120
- Theme controls are hidden until the left-rail `Theme` tab opens their popover.

docs/workflows/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ architecture, reference, quality, or operations docs.
2323
| 14 | [Markdown reader refactor](task-14-markdown-reader-refactor.md) | Reader pipeline decomposition and behavior-preserving refactor | Ready after Task 13 |
2424
| 15 | [Refactor wave integration](task-15-refactor-wave-integration.md) | Cross-task verification and workflow/docs synchronization | Ready after Tasks 10-14 |
2525
| 18 | [Memory read status and memory actions](task-18-memory-read-status.md) | Persistent read/unread metadata, taxonomy creation/assignment, link-only status, reader action menu, memory deletion, settings page, Flashback marker selection, Moment section bookmarks, product-language migration, and imported media policy | Ready |
26+
| 18-alpha | [UI component and routing refresh](task-18-alpha-ui-routing-refresh.md) | Shared taxonomy rendering, popup shell consolidation, menu/composer/theme popup migration, and existing route-surface alignment | Ready on `workflow18-read-status` |
2627
| 19 | [Codex translation for memories](task-19-codex-translation.md) | ChatGPT sign-in through Codex, translation target settings, Codex-backed memory translation, and translated CONTENT.md variants | Ready |
2728

2829
## Archived Workflows
@@ -98,4 +99,5 @@ Use concise branch names that match the workflow:
9899
- `refactor/markdown-reader`
99100
- `chore/refactor-wave-integration`
100101
- `feat/memory-actions`
102+
- `refine/ui-routing-refresh`
101103
- `feat/codex-translation`

0 commit comments

Comments
 (0)