Skip to content

P5 O8 M5: owners on rows and the People toggle - #323

Merged
SSFSKIM merged 13 commits into
masterfrom
p5-o8-m5
Oct 29, 2026
Merged

SSFSKIM merged 13 commits into
masterfrom
p5-o8-m5

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 29, 2026

Copy link
Copy Markdown
Owner

P5 O8 M5: owners on rows and the People toggle, built to docs/doperpowers/plans/2026-10-28-p5-o8-org-interface.md §M5 (re-planned in #303 on the owner's Q2 and Q3 answers, P5 Decision Log 111). "Add owner" is M5b, later.

What the sidebar now does:

  • Owners on rows (Q2). A row of a session you don't own alone shows its owners after the title, as first names in the chip's secondary style: "you, Ana", or "Ana, Ben +3" past two. Its hover card lists every owner with their email. Your own sessions look as they did. A record drawn at a listed address takes the listing's owners.
  • Names. The signed member shape has no name, so a first name comes from the email's local part (memberName). Colliding names read the whole local part, and then the whole email. An owner the head doesn't list reads "former member". Main sends OrgRows.members ({id, email, name} for every owner the rows name, from the held head) and OrgRows.member (the signed-in member), so "you" is judged against the identity the rows were computed for.
  • The People toggle (Q3). A project or machine row offers one where it can act: when the row has others' sessions, or while it is on. It is off by default and remembered per row under the layout key sidebar.people (no layout version change). It is the first hover action when shown (lucide Users, pressed while on) and a checked menu item. While it is on, other people's sessions join the list in activity order, each with owners and machine chip. While it is off, the row reads "+N others", faint, hidden on hover.
  • Ownership comes first. An address is others' when a listing there isn't mine. Others' rows, records or listings, are drawn only under People; otherwise they are counted. Rollups count yours only, so others' waiting never reads as "needs you". Others' hidden rows add no activity to a project's ranking, and a machine with only others' sessions stays listed with its count.

What changed

  • Shared: src/shared/org/member-name.ts (new), src/shared/ipc/schema/org.ts (OrgMember, OrgRows.members, OrgRows.member), src/shared/ipc/schema/layout.ts ('sidebar.people', SidebarPeopleSchema).
  • Main: src/main/org/rows.ts (members and member on rows()).
  • Renderer:
    • stores/sessions.ts keeps members and member beside listed;
    • stores/people.ts (new) is the toggle's set, read once through layout.get (loaded from App.tsx) and written 250 ms after the last change;
    • sidebar/owners.ts (new: ownersLabel, ownerEntries) and sidebar/RowTitle.tsx (new: the title and owners truncating together, the chip keeping its room);
    • sidebar/derive.ts, ProjectRow.tsx, menus.tsx, ListedRow.tsx, SessionRow.tsx, HoverCard.tsx, Sidebar.tsx.
  • Docs: the O8 spec (M3 ticked as landed; M5's build decisions, review fix and Surprises) and the O8 report (M5's account, and the owner's M3 sitting steps).

Fixes after the build

  • A flake fix, in the test file only (46bd59c). OrgSection.test.tsx now runs on its own clock, with Date frozen in vi.hoisted before any module loads. app/use-now's module-level now therefore equals every Date.now() the test reads, and an age of exactly n days can no longer floor to n - 1. That flooring is the red O3-C's class 1a hit twice: run 40766738379, and again tonight. Only Date is faked; timers stay real. This closes the docs/tech-debt-tracker.md row P5 Decision Log 126 added (2026-10-28, P5 O8, OrgSection.test.tsx).
  • A second test-only flake fix. In src/main/org/org-session.test.ts (M3's), the teardown's rm now retries ENOTEMPTY (maxRetries: 5, retryDelay: 20). The session's close() doesn't wait for a file write already under way, so a late write could land in org/ while it was being removed. That failed "a focus whose window is gone…" in its afterEach, on class 1a run 40789464852.
  • The People toggle shows only where it can act (54aab1a): when the row has others' sessions, or while it is on. The hover action and the menu item follow the same rule, on project and machine rows alike.
  • The M3 sitting's steps in the O8 report now read admin show's root lines (desk-hub: admin show lists the org's roots #316): one root line before the add, then two with the app's device among them, alongside head version N, then N+1, and the Signer row.
  • A third test-only fix: the rekey replay's crash setup (8e21b63). The desk track's class 1a, run 40791006724, failed "the replay at load, a crash after the first rename…": it expected the new device's id and got undefined.
    • The cause: crashedRekey() wrote the crash's rekey intent behind a live session whose anchor write for the head it had just adopted was still queued. close() doesn't wait for that write, which then overwrote the intent.
    • The setup now closes the session, waits for the anchor on disk, then writes the intent.
    • The real rekey writes its intent inside the session's commit queue (org-session.ts:1373-1381), so production has no such race.

Validation Evidence

  • The final gate, on 7e58d69 (this branch's code head; only docs follow it): run 40794571273, --gates all --lane hosted --class1a pool --peer none. Green: 48 jobs succeeded, 3 skipped (packaged and two matrix placeholders). The green jobs include e2e:default, e2e:discover, unit:darwin and the hosted groups presentations, machines, delivery, dashboard, c12 and browser-chrome. One flaky line, e2e/browser-cua.spec.ts:483, was green on retry; it is M3's known one, on a path this branch doesn't touch.

  • Class 1a: green at 8d18883 (run 40789984462) and 8e21b63 (run 40793508684).

  • The first final gate (run 40786951312 on 53f147e) found this branch's one e2e regression. e2e/shell.spec.ts:50, Item 6: at the sidebar's 200px floor, closeProject's line-center click landed on the People button, which then showed on every row. Fixed at 54aab1a: the toggle shows only where it can act (others to show, or on), so rows look as before M5 for anyone with no others. A new Sidebar.test.tsx case, "no People toggle on a row with no others and the toggle off", was red, then green.

  • The focused suites, each file run alone (npx vitest run --project <node|renderer> <file>): member-name 6, rows 23, schema 204, layout 41, wire 25, owners 6, people 7, derive 45, Sidebar 100, events 43, HoverCard 40; App.test.tsx 11 under renderer-timing; anchor 11, gateway-claims 2, CommandPalette 21.

  • The rekey setup fix. Probe: a 30 ms delay put before writeAnchor's write (never committed) failed all three replay boundaries every time, the first-rename one with the CI's signature. With the setup fix, the four replay cases pass with the probe in. Without the probe, npx vitest run --project node src/main/org/org-session.test.ts passed 20 of 20 runs, 94 of 94 each. Class 1a on 8e21b63: green, run 40793508684.

  • The flake fix. npx vitest run --project renderer src/renderer/src/settings-tab/OrgSection.test.tsx ran 20 times in a row on this Mac: 20 of 20 green, 31 of 31 each time. Class 1a on 46bd59c: green on the later heads (run 40789984462 at 8d18883); its own two runs went red on the known engine-host ipc.test.ts flake (run 40789008525, tracker line 462) and on the teardown race fixed at 8d18883 (run 40789464852).

  • The review. reviewer-medium found one P2: a People toggle clicked before layout.get answered was replayed as a flip over the stored set, so "Show" on a project stored as on turned it off once the read landed, and that was saved. Fixed at 8541787: an early toggle records the state the person asked for. The proof is people.test.ts's "keeps a stored key on when an early toggle asked for it on, and leaves untouched stored keys alone": stored [MAWS, STUDIO], MAWS clicked before the read answers, and the store ends with both on and writes {version: 1, on: [MAWS, STUDIO]}. Against the flip code (50a1ab9) it fails (expected false to be true), as does the double-toggle case beside it. With the fix, people.test.ts passes 7 of 7. The fix is one finding with a failing-then-passing test, so no second round was run (the architect agreed).

  • Not verified: no visual check in a running app. Styles use existing tokens and the siblings' patterns (MachineChip's text-ui-sm text-fg-muted, the rollups' hover hiding, IconButton's aria-pressed).

Unresolved Review Findings

None. reviewer-medium's only finding is fixed above.

Residue

  • sidebar.people keys aren't moved or pruned. When a project's address key becomes an org key, the toggle reads off until set again; layout-model.ts's rekeySets does this for expandedProjects. Stale keys are never pruned. Rare and cosmetic, a debt row.
  • Others' sessions in Needs you and "Mark all read". Others' records still reach the attention surfaces. Attention across machines is O7 M6's and O3's, so this is theirs to settle, not M5's.
  • close() doesn't drain in-flight writes. org-session.ts's close() (:1527) ends the signer, weekly and deliveries without awaiting a file write already under way (a settle, an obligation, the anchor), so such a write can land after close.
    • Production calls it only at quit, from the shutdown step 'org' (src/main/index.ts:1072); the session is created once per process (index.ts:350).
    • Sign-out never closes. It fences through the generation and the signer's lifecycle epoch (org-session.ts:1449-1458) and removes only access.json (:1475). The other removals are access.json at a signed-out load (:922) and registration.json at a cancelled commit (:1174); no close() precedes either.
    • A late write is an atomic rename that the next launch loads whole, so no later sign-in in the same run can read a closed session's state. The tests met it twice, and both are fixed test-side: the teardown's rm, and the rekey crash setup. A tracker row follows at landing.
  • The e2e helper closeProject clicks the line's center (e2e/support/sidebar.ts:60). At the 200px floor a row with four hover actions has its center on the first action. The name keeps its own click box, since the actions are a flex sibling and not an overlay. The architect writes the tracker row at landing; it closes when the helper clicks the name.
  • summary.sections is never read back. stores/summary.ts's load() has no production caller, so collapsed summary sections reset at each launch. This predates O8; a debt row for the summary pane's owner.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

Main sends OrgRows.members (every owner a row names, named from the held head's emails; an unlisted id reads 'former member') and OrgRows.member (the signed-in member). A row of a session you don't own alone names its owners after the title ('you, Ana', 'Ana, Ben +3'), its hover card lists them with emails, and a record at a listed address takes the listing's owners. Each project and machine row has a People toggle (hover action and checked menu item), remembered under the layout key sidebar.people; off, others' sessions are counted as '+N others', on they are drawn in activity order, never in the rollups.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ng's show-before-and-after check

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…heck)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…a flip, over the stored set

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…n't lag an age of n days to n - 1

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…d after the add

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…) didn't wait for landing in org/

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ed session's anchor is on disk

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ow, or on)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…n Log

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 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-29T01:58:21.802851Z 92dc302 PR opened
ℹ️ 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.

@SSFSKIM
SSFSKIM merged commit 0db3870 into master Oct 29, 2026
SSFSKIM added a commit that referenced this pull request Oct 29, 2026
…; #320 and #321 recorded; flake rows tallied

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 29, 2026
…'s start

rows.ts keeps O8 M5's memberNames import and takes repoProjectId from @shared/machine/project-ids, where M3 moved it.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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