Repository navigation
feat(members): open the last member on arrival, mirror it in the URL - #8546
Conversation
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — ✅ PASSUX-level review of Both notices render cleanly in the pixels, and the blind reader parsed every element this PR adds. Reconciliation: the arrival auto-open (shot-01) read as "the one currently open — sure"; the dead-link notice (shot-02) was read exactly as built — "I asked for a member called 'ghost', it's gone, so the app showed me radar instead"; the roster variant (shot-03) was correctly linked to the same event; the reader confirmed shot-03/shot-07 as one screen in two states; the mobile back arrow and URL caption were read correctly. No new control was misread or feared, every state the diff introduces is screenshotted, and nothing in the diff hard-swaps a persistent element (the notices are new transient lines; the auto-open is first render), so no recording is required. The reader's remaining confusions (ghost-avatar row, "auto", "Normal" pill, identical fixture replies, "56y ago" fixture timestamp) all belong to pre-existing UI or capture fixtures, not this PR's surface. UX-Verdict: PASS The change is behavioral and self-announcing: the blind reader read both "no longer on the roster" notices exactly as built, and every state is screenshotted. [UX-REVIEWED] 6303fd1 |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS URL-as-single-source with a per-browser memory and a spoken fallback is the right shape, follows the page's existing navigation conventions, and every description claim has backing code. [DESIGN-REVIEWED] 6303fd1 |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of Both data files are read, the contract's mechanical checks are done: First-Principles-Verdict: PASS The quoted ask (auto-open, remember on return) is delivered, and every rider — URL, notices, history rules — traces to a recorded review round or a documented invariant. What this change shipsIntent: land on a member's chat on arrival and return to the last one opened when navigating back — an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 6303fd1 |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
cdffffd to
4777a72
Compare
4777a72 to
e891871
Compare
|
UX Review disposition — fixed in
|
|
UX Review disposition — fixed in
|
|
UX Review disposition — accepted-and-deferred → #8570
|
|
UX Review disposition — accepted-and-deferred → #8570
|
e891871 to
0d139ea
Compare
0d139ea to
d11cc70
Compare
d11cc70 to
ab6615e
Compare
|
UX Review disposition — fixed in
|
|
UX Review disposition — fixed in
|
|
UX Review disposition — fixed in
|
2c9f6ad to
7b96261
Compare
|
First Principles disposition — rejected (kept as designed)
|
7b96261 to
7d15dc2
Compare
7d15dc2 to
49cbd39
Compare
|
First Principles disposition — rejected (kept as designed)
|
|
First Principles disposition — rejected (kept, test-only surface accepted)
|
49cbd39 to
7555c0b
Compare
The Crew Members page landed on an empty column every visit and forgot
which member was open when the user navigated away and back. Now:
- A visit that names no member opens the remembered one, else the first
row in display order — never the empty column.
- The last member opened is remembered per browser (mc-members-last-member,
via safeStorage), so leaving for Sessions/Settings and returning, or a
reload, lands on the same conversation. A remembered member that was
deleted or renamed falls back to the first row without an error.
- The open member rides the URL (?member=<name>): a reload keeps it and a
link lands on one. Switching members REPLACES the entry — the page holds
one history entry however many members are visited, so Back leaves it in
one press, the Sessions sidebar's rule; only the below-md roster->thread
step pushes. The value is the exact crew name, not the slug — the slug
is lossy and would misroute Oncall to oncall. A link naming a member
that is gone takes the same fallback and says so in a warn-toned status
above the thread, leading with the swap ("Showing X — “Y” is no longer
on the roster."; 13 catalogs + en-XA): the user asked for someone
specific, and a silently mounted other thread is the misroute this page
exists to prevent. The stand-in opened by that fallback is the page's
choice, not the user's, so it does NOT become the memory — one dead
link cannot overwrite the member the user had chosen.
- Below md the page stays a two-level list->detail navigation: no
?member= IS the roster, so no auto-open there (same rule as
SidePanelLayout's remembered tab). A stale ?member= returns to the
roster with the same notice above the list. The header back pops the
entry the roster pushed (no duplicate roster entry in history) and
drops the param in place for a deep link, which has no roster behind it.
Tests cover default, restore, stale fallback (memory: silent; URL: with
notice on both sides of md, retired on the next open, memory preserved),
URL-over-memory, click writes URL+memory, a driven-history walk over two
members that leaves the page in one Back, and the below-md back semantics
(the useNavigate mock records AND performs against the MemoryRouter).
Summary
The Crew Members page landed on an empty middle column on every visit and forgot which member was open when you navigated away and back. Zezhen's ask: 「crew mode 页面点开要打开一个 crew 的 chat,如果来回 navigate 要回到上一个打开的」.
mc-members-last-member, viasafeStorage), so leaving for Sessions / Settings and coming back, or a reload, lands on the same conversation. A remembered member that was deleted or renamed falls back to the first row without an error./members?member=<name>): a reload keeps it, and a link lands on one. Switching members replaces the entry — the page holds one history entry however many members you visit, so Back leaves/membersin one press (the Sessions sidebar's rule); only the below-md roster→thread step pushes. The value is the exact crew name, not the slug — the slug is lossy (Oncall/oncallshare one), and a slug link would misroute to the other member's thread, the exact failure this page's header comment says it exists to prevent. The URL is the single source of which member is open; clicks write the URL and one sync effect opens the thread, so click / back / link / restore share one path. A link naming a member that is gone (deleted/renamed) falls back to the first row and says so in a warn-toned status above the thread, leading with the swap — "Showing alpha — “ghost” is no longer on the roster." (pages.membersPage.member_gone; 13 catalogs + regenerateden-XA) — the user asked for someone specific, so the swap is neither silent nor muted. The stand-in opened by that fallback is not written to memory: it is the page's choice, not the user's, so one dead link cannot overwrite the member they had chosen. The remembered-member fallback stays silent: there the user named nobody.?member=IS the roster, so no auto-open there (the same ruleSidePanelLayoutapplies to its remembered tab); a stale?member=returns to the roster with the same notice above the list (member_gone_roster), and the header back button pops the entry the roster pushed (so the browser's own Back does not land on a duplicate roster entry) while a deep link — which has no roster entry behind it — drops the param in place.Storage scope: one key per origin. The roster is the gateway's global crew list and localStorage is already per-gateway, so there is no frontend workspace dimension to key on.
Two new strings,
pages.membersPage.member_goneandmember_gone_roster, added to all 13 catalogs withen-XAregenerated; the existingpick_a_memberempty state is still what the mobile roster and an empty crew list show.Screenshots
Captured from the head (6303fd1) by
website/scripts/capture-members-remember-last.mjsagainstwebsite/capture/members-page.html?nav=1, which mounts the REALMembersPage(gateway-free: API answered by route interception, roster of four fixtures) behind a capture-only caption bar that prints the router's livepathname + searchand offers a history pop — the address bar is outside aMemoryRouter. Every frame asserts its state (URL, notice text, tone, which thread is mounted) before it is written; the run printedall frames verified.The earlier pod recording (GIF on a since-dropped commit) is retired; it predated the history and fallback rules.
Review round (bolichen97, CHANGES_REQUESTED)
replaces; only the below-md roster→thread step (and nothing on desktop, where a member is always open) pushes. Pinned by the driven-history test.remember=false(goneStandInRefcarries the intent across the URL replace into the open it triggers); the gone-link test now seedsbetaas the memory and asserts it survives.useNavigatemock now performs the navigation against theMemoryRouteras well as recording it; one test walks two members and presses Back.Note on 2:
resolveDefaultMemberalready prefers the remembered member for the stand-in, so a valid memory was never overwritten by a dead link — the harm was the empty/stale-memory case, where the first row became the memory without the user choosing it. That write is now skipped; the test seeds no memory and asserts it stays empty, and a second test pins that the remembered member is the stand-in.UX round-5 (head
c328fa5) item taken: re-clicking the stand-in row now also retires the swap notice (an explicit choice acknowledges the swap; test pinned). Evidence gaps closed by the screenshot set above.UX round-4 suggestion also taken: the two
en.jsonstrings use the catalog's curly“{{name}}”convention (en-XAregenerated;--checkclean).Tests
website/src/pages/members/MembersPage.test.tsxresolveDefaultMember(pure): default → first row; restore → remembered; stale → first row; empty roster →undefined.?member=beats memory;?member=naming a gone member → first row + URL rewritten +member-gone-notice(role=status, warn tone, leads with the swap) that retires when another member opens, memory left untouched (a later explicit click on the stand-in does write it); click writes URL + memory andaria-current; driven history (Routes+ realMemoryRouterentries): enter/membersfrom another page, walk two members, one Back lands on the other page.memberThreadnot called, URL untouched); stale?member=→ URL cleared, roster shown withmember-gone-roster-notice, no POST, notice retires on tap; tap → thread + URL; header back → pops the roster-pushed entry (navigate(-1), performed against the router, not only spied), memory kept; from a deep link → param dropped in place, roster shown.memberThreadasserted per member (not.toHaveBeenCalledWith('pkg-a')) rather than never-called — the page now opens the first row on arrival, which those files were written before.useNavigatemock now records every call AND performs it against theMemoryRouter, so the history cases drive real push/replace/pop rather than asserting on a spy alone.Local:
tsc -bandeslinton both files clean. Vitest left to CI per the work item's rule.Feature map
docs/feature-map/README.mdCrew Members row: the reach column now names the?member=<name>URL contract (bare/membersopens the remembered member else the first row; below md it stays the roster). Per the maintenance contract this is a new user-facing contract on an existing page, so the row is updated in-PR (GPT round on68c65fec3,feature-map-correctness).Not changed
No refactor of the page beyond splitting the sort into unfiltered/filtered (so "first member" ignores the search box) and moving the thread-open body into
activateso the URL effect and the same-member re-click share it.