Skip to content

refactor(web): share the Home rows list, menu and dialog parts - #1926

Merged
Quick104 merged 6 commits into
feat/collections-revampfrom
refactor/calm-kit
Oct 4, 2026
Merged

Quick104 merged 6 commits into
feat/collections-revampfrom
refactor/calm-kit

Conversation

@Quick104

@Quick104 Quick104 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

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 as HomeRow and PageRef, so collections could only use them by copying them. This PR moves them to web/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 from RowLine (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.
  • SelectModeBar and SelectAllHeader: 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 replaces hooks/queries/homeRows/usePeek.ts and the generic half of lib/homeRows/peek.ts.
  • StepDialog and StepCount: the AddRowDialog shell (centered dialog, bottom sheet below 1024px, back link, footer, focus returns to the opener).
  • CalmPage: the 1000px column and its header.
  • PageMoreMenu, PosterTile and SelectCheckbox move unchanged.

The moved Home rows files are deleted, and every Home rows caller imports from calm/. RowLine and the Home rows SelectModeBar stay 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/homeRows now imports the peek types from components/calm/usePeekLimiter; those imports are type-only.

ConfirmDialog gains two optional props for the collection confirms: bullets, a list of what the action does, and irreversible, 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.

collectionKind in lib/homeRows/describe.ts now reads the type labels from lib/collections/types.ts, so Home rows and collections use the same "Manual", "Smart" and "Synced list" names.

The new ConfirmDialog props and the ActionMenu help lines and submenus have no caller in this PR. The collection editor and list PRs stacked on this one are their first users. DeleteRowDialog keeps its own dialog rather than moving onto ConfirmDialog: after a 412 it stays open with "Reload row", and it can't be closed while busy, but ConfirmDialog is 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

  • Web: lint (no errors, no warnings in the changed files), format:check, build, budget:check, tsc -b and make test-web (806 files, 7,449 tests) pass.
  • The existing Home rows component and page tests pass with only import paths changed. The four limiter tests moved with the limiter.
  • Same markup: in all 208 Home rows component and page test files, the page HTML after each DOM change matches before and after this change, once React's generated ids and random UUIDs are masked. The ids shift because ActionMenu items call useId. The capture harness is not committed.
  • New tests cover each calm part: the row switch keeps focus through collapse and expand; a submenu opens with the right arrow key; StepDialog closes 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 the ConfirmDialog list, warning and accessible description.
  • make verify-local-paths passes. No Go, contract or migration files changed, so the Go and contract checks were not run. make verify-case-collisions does not exist on this base and was not run.

Risks

None identified. No API, data or visible change.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

  • Harness: Claude Code (in T3 Code)
  • Tool(s): Claude Code subagents (implementer, independent reviewer)
  • Model(s): claude-opus-5-5[1m]
  • Involvement: Fully AI-generated, human review pending
  • Adversarial review: an independent reviewer subagent compared each moved part with its Home rows original for matching markup and props, re-ran the focused tests, tsc -b, eslint and prettier, and checked that the new tests fail without the new modules. It raised three points. The ConfirmDialog list and warning sat outside the dialog's accessible description; fixed, with a test. The new ConfirmDialog props have no caller because DeleteRowDialog did not move onto it; kept for the collection PRs, with the reason above. lib/homeRows imports peek types from components/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

  • Replaces the per-profile allow-list model with a single is_shared flag: 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.
  • Adds a schema v30 migration and a SQL migration (20261003235347_personal_collection_login_sharing.sql) that keeps a collection shared only when its old allow list covered every profile, otherwise makes it private. Collection ordering flattens to one order per creator.
  • Collection sync now resolves item access through the collection owner's profile before fetching sources and fills the item limit only with titles the owner can access (sync.go).
  • Migrates the Home rows page to shared calm components: CalmPage, PillSwitcher, ActionMenu, ListRow, SelectModeBar, StepDialog, and the shared peek limiter (HomeRowsPage.tsx).
  • Behavioral Change: allowed_profile_ids is removed from all v2 collection schemas and rejected on create/update; GET /api/v2/collections/order and reorder reject any group_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.

Quick104 and others added 5 commits October 4, 2026 14:01
# 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]>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ce1b802e-029c-4ab8-a092-218b8c9776ed

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T22:25:52.522637Z 959dab5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Quick104
Quick104 changed the base branch from integrate/collections-web-base to feat/collections-revamp October 4, 2026 22:21
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@Quick104
Quick104 merged commit 7abfa91 into feat/collections-revamp Oct 4, 2026
15 checks passed
@Quick104
Quick104 deleted the refactor/calm-kit branch October 4, 2026 22:31
@macroscopeapp

macroscopeapp Bot commented Oct 4, 2026

Copy link
Copy Markdown

The integrated diff changes more than the Calm component layer.

The current Validation tasks: line omits these impacts. Suggested replacement:

Validation tasks: changes #1141 C1, #1142 C2, #193 S1–S3, #194 A1, A2, A3, A4, #195 W1, W2, W6; unblocks #193 S6–S7, #195 W5, W7; changes Silo-Server/silo-apple#20 C1–C4, C7, Silo-Server/silo-apple#21 C1–C4, C7, Silo-Server/silo-android#5 C1–C4, C6–C7, Silo-Server/silo-android#6 C1–C4, C7

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant