Repository navigation
refactor(web): share the Home rows list, menu and dialog parts - #1926
Conversation
# Conflicts: # contracts/api/v2/fixtures/get_system_info_ok.json
…eb-base # Conflicts: # contracts/api/v2/fixtures/get_system_info_ok.json
The scope adapter moved isListBackedCollectionType to lib/collections/types. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The collections redesign reuses the Home rows list rows, page pills, row and More menus, select mode bar, poster peeks and two-step dialog. They move to components/calm and take plain props instead of Home rows types, so collection pages can render them without depending on HomeRow or PageRef. Home rows imports them from there and renders the same DOM. ActionMenu gains optional help lines and submenus, and ConfirmDialog gains bullets and the "This can't be undone." line, for the collection menus and confirms that follow. The Home rows collection kind label now comes from collectionKindOf so both features name types the same way. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The bullets and the "This can't be undone." line sat outside the alert dialog's description, so screen readers announced only the first sentence and skipped the consequences of a destructive action. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
The integrated diff changes more than the Calm component layer.
The current
Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
Problem
Related issue: #192
Validation tasks: none changed; reaches #1141 C1 (Not run). Home rows renders the same markup, so no re-walk is needed.
The collections redesign gives server and personal collections the same list rows, menus, library pills, select mode, poster peeks and two-step dialog as the Home rows pages. Those parts live in
components/homeRows/and take Home rows types such asHomeRowandPageRef, so collections could only use them by copying them. This PR moves them toweb/src/components/calm/with plain props and points the Home rows pages at the new location. Home rows looks and behaves the same.Stacked on
integrate/collections-web-base, which combines the Home rows stack (through #1913), the collections API stack (through #1907) and the collections web stack (through #1920). That branch has no pull request of its own.Approach
New in
components/calm/:ListRow: the row layout fromRowLine(peek, name and tag, sentence, switch, ⋯ menu, collapsed and select states).PillSwitcher:PageSwitcher, taking plain string values.ActionMenu:RowMenu, plus an optional help line per item and submenus that open with the right arrow key.SelectModeBarandSelectAllHeader: take a list of actions, a limit and a noun such as "rows" or "collections".PosterPeek:RowPeek, taking the icon to show while posters load or when there are none.usePeekLimiter: the on-screen poster loader shared by every peek on a page (at most 4 requests at once, 5-minute stale time). It replaceshooks/queries/homeRows/usePeek.tsand the generic half oflib/homeRows/peek.ts.StepDialogandStepCount: theAddRowDialogshell (centered dialog, bottom sheet below 1024px, back link, footer, focus returns to the opener).CalmPage: the 1000px column and its header.PageMoreMenu,PosterTileandSelectCheckboxmove unchanged.The moved Home rows files are deleted, and every Home rows caller imports from
calm/.RowLineand the Home rowsSelectModeBarstay as small components that hold the Home rows wording (the hero and "Yours" tags, the row sentence, Turn on / Turn off / Delete…, the 100-row limit) and render the calm parts.lib/homeRowsnow imports the peek types fromcomponents/calm/usePeekLimiter; those imports are type-only.ConfirmDialoggains two optional props for the collection confirms:bullets, a list of what the action does, andirreversible, which adds "This can't be undone." beside the buttons. Both are part of the dialog's accessible description, so a screen reader reads them when the dialog opens. Without the props the dialog renders as before.collectionKindinlib/homeRows/describe.tsnow reads the type labels fromlib/collections/types.ts, so Home rows and collections use the same "Manual", "Smart" and "Synced list" names.The new
ConfirmDialogprops and theActionMenuhelp lines and submenus have no caller in this PR. The collection editor and list PRs stacked on this one are their first users.DeleteRowDialogkeeps its own dialog rather than moving ontoConfirmDialog: after a 412 it stays open with "Reload row", and it can't be closed while busy, butConfirmDialogis an alert dialog whose confirm button closes it.No API change. jellycompat, the Apple and Android clients and the user manual need no change.
Validation
tsc -bandmake test-web(806 files, 7,449 tests) pass.ActionMenuitems calluseId. The capture harness is not committed.StepDialogcloses on Escape, returns focus and becomes a bottom sheet below 1024px (checked by class, since jsdom has no layout); no peek loads before it is on screen and no more than 4 load at once across the page; the select bar's wording and limit; and theConfirmDialoglist, warning and accessible description.make verify-local-pathspasses. No Go, contract or migration files changed, so the Go and contract checks were not run.make verify-case-collisionsdoes not exist on this base and was not run.Risks
None identified. No API, data or visible change.
Checklist
AI Disclosure
tsc -b, eslint and prettier, and checked that the new tests fail without the new modules. It raised three points. TheConfirmDialoglist and warning sat outside the dialog's accessible description; fixed, with a test. The newConfirmDialogprops have no caller becauseDeleteRowDialogdid not move onto it; kept for the collection PRs, with the reason above.lib/homeRowsimports peek types fromcomponents/calm; left as is, since the imports are type-only.🤖 Generated with Claude Code
Note
Replace per-profile collection sharing with login-wide sharing and share the Home rows list, menu, and dialog parts
is_sharedflag: a shared collection is visible to every profile on the login, while only the creator can edit it. Personal collection groups are removed entirely and their API routes now return HTTP 501.calmcomponents:CalmPage,PillSwitcher,ActionMenu,ListRow,SelectModeBar,StepDialog, and the shared peek limiter (HomeRowsPage.tsx).allowed_profile_idsis removed from all v2 collection schemas and rejected on create/update;GET /api/v2/collections/orderand reorder reject anygroup_id; collection reorder now requires the acting profile's complete own-collection list. The v1 collection bridge still reports effective audiences for compatibility.Macroscope summarized 49d503e.