Skip to content

P5 O8 M4a: the Org page, its shape, people and devices - #344

Merged
SSFSKIM merged 32 commits into
masterfrom
p5-o8-m4a
Oct 29, 2026
Merged

SSFSKIM merged 32 commits into
masterfrom
p5-o8-m4a

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

P5 O8 M4a: the Org page, its shape, people and devices. Built to docs/doperpowers/plans/2026-10-28-p5-o8-org-interface.md §M4a (re-planned in #328, P5 Decision Log 130). Machines' edits (M4b) and delegations (M4c) come later.

What a root Mac can now do from Settings › Org:

  • See the org in Q1's four groups:

    • You: this Mac, the hub sign-in, new keys, and your other devices.
    • People: each member with their devices, the roots marked.
    • Machines: read-only, each with its owners and whether it is up.
    • Org: the state, the roots, the recovery key, and M3's signer lines.
  • Sign changes from the page:

    • add or remove a person;
    • change a role or an email;
    • remove a device;
    • make a root.

    Each change opens one sheet that shows what will be signed, line by line, with the checks' warnings. Consent is bound to the digest of what was shown, so a change that moved under the sheet reads stale. A change the checks refuse is named in the sheet and never reaches Touch ID.

  • Pair a device from the app.

    • The app makes the pairing code and shows it once.
    • It polls H1 for the target member's pending entries, judges them with org-protocol's judgeEntry, and shows the entry's fingerprint to compare.
    • Your own later device is endorsed by this Mac's step-up key inside the same Touch ID. Another member's first device is unendorsed, as the protocol allows.
    • A pairing that ends during Touch ID reads "cancelled", one that ends before it reads stale, and once the signed state is kept the sheet says that a cancel no longer withdraws it.
    • For a member who signs nothing, the later-device rule is stated in place of the action (the countersign flow is not built).
  • Refusals in place. A refused sign-in, re-anchor or rekey shows under the control that sent it (OrgRefusal.attempt). A refusal that names none gets a row of its own.

  • Read-only without the right to sign. A Mac that isn't a root sees the page read-only. An open sheet withdraws its signing actions the moment that right is lost.

Underneath:

  • successorProblems and stateProblems in org-protocol. Every check verifySuccessor makes except the signatures, each problem named, for an ordinary successor. The app's checks.ts and the desk-hub admin's amend both run it before anything is signed. It has a fail-fast mode and a per-code cap, so unauthenticated input can't make it quadratic. The pairing judges moved there from admin.ts.
  • The signing path. Edit.endorse and Edit.live: StateSigner.sign endorses inside the one confirmation, and live() is checked at apply, before Touch ID, after the confirmation, and before the slot's write.
  • close() fences and joins every writer under org/. That covers HeldOrg.close(), the parts' operations in flight, and the commit queue refusing new turns. Main's quit waits for it, within the shutdown grace. The two org-session.test.ts workarounds are gone. A signer operation that meets close reads as stopped, not as a storage failure.
  • Since P5: a machine key speaks for one ref whatever the route (409 key-held), and one member-email grammar #338 landed first:
  • The page's look, checkable through the gate. e2e/org-page.spec.ts in e2e:settings seeds a realistic org through a main seam that only a harness build carries (__MAWS_HARNESS_BUILD__, MAWS_E2E=1, unpackaged). The seed has a member whose name and email wrap, a member with several devices and roots, a running pairing, and a refusal naming no attempt. The case forces classic scrollbars, photographs each group and the pairing sheet, and asserts only structure: nothing wider than its box, every action whole on all four edges, no machine shown by its raw ref. Its first run caught a real overflow, fixed in the layout: Setting's cells take min-width: 0 and overflow-wrap: anywhere, and text actions never shrink. The Org group now names machines by the org state's names.

What changed

  • org-protocol and desk-hub. Desk-track reviewed, and carried on master by P5: a machine key speaks for one ref whatever the route (409 key-held), and one member-email grammar #338.
    • apps/org-protocol/src/pairing.ts takes the judges (judgeEntry, entryDevice, isPairedDeviceId, isRpId).
    • org-state.ts gains successorProblems and stateProblems, and stateInvariants reads them.
    • apps/desk-hub/deploy/admin.ts imports the judges and runs the pre-sign check in amend.
    • Tests: successor-problems.test.ts (new) and pairing.test.ts.
  • Main.
    • New: src/main/org/edits.ts (the change composers), pairing.ts (the app's pairing), view.ts (OrgView), and page-fixture.ts (the harness-only e2e seam).
    • checks.ts, signer.ts (Edit.endorse, Edit.live, close), held.ts (close(), StartInput.open), org-session.ts (the commands, refused.attempt, close()'s fence and join), deliveries.ts, weekly.ts, signing-store.ts (the re-run after the first-write mark), hub-client.ts (pendingOf, isMemberEmail), register.ts, timing.ts.
    • src/main/device/step-up.ts: the endorsement and the live guard.
    • src/main/index.ts: the wiring, the quit's join, and the harness-guarded fixture.
  • Shared. src/shared/ipc/schema/org.ts (OrgView, OrgChange, org.view, org.preview, org.change, org.pair.*, OrgStatus's pairing, OrgRefusal.attempt), names/org.ts, routes.json.
  • Renderer.
    • src/renderer/src/settings-tab/org/ (new): OrgSection (the shell), YouGroup, PeopleGroup, MachinesGroup, OrgGroup (M3's signer lines, moved), ChangeSheet, PairSheet, parts, and the tests split by group.
    • copy.ts's ORG; settings-tab/parts.tsx's wrap rule.
    • sessions/Sheet.tsx: SheetForm's default action is optional.
  • Tests and gate.
    • test/org/org-page.local.test.ts (new, in TIMING_NODE_TESTS) and e2e/org-page.spec.ts (new, in e2e:settings).
    • launchMaws' appKitDefaults.
    • electron.vite.config.ts's __MAWS_HARNESS_BUILD__.
    • e2e-default-specs.test.mjs's bare-set pin is 101 (with O9's lane-a.spec.ts).
  • Docs.

Validation Evidence

  • The checks refuse before anything is signed. In org-protocol, successor-problems.test.ts passes 62/62: one case per code, parity with verifySuccessor over the package's vectors, and the fail-fast mode. The deploy suites, admin and admin-verbs and production-scripts, pass 136/136.
    • pnpm --filter org-protocol exec vitest run test/successor-problems.test.ts
  • The composers, the checks, the signing path and pairing. Each file was run alone with npx vitest run --project node <file>:
  • close()'s fence: org-session.test.ts, 113/113, 20 runs in a row clean with both workarounds removed. The tally also counted any Unhandled, ENOTEMPTY or stderr output as a failure. Its cases include:
    • a held anchor write that close() waits for;
    • a released hub read that writes nothing after close;
    • a direct view.advance that close waits out;
    • a reset, a Touch ID and a discard each meeting close and reading as stopped;
    • a 201 post whose follow-up read lands after sign-out, settled later with no second prompt.
  • The page. Each file was run alone with npx vitest run --project renderer <file>: OrgSection 12, YouGroup 11, PeopleGroup 9, MachinesGroup 3, OrgGroup 18, ChangeSheet 11, PairSheet 6, SettingsView 34, sessions/dialogs 21.
  • Acceptance 4a on the local hub: test/org/org-page.local.test.ts passes 6/6, six runs in a row. It runs on desk-hub's Worker in Miniflare, with app A made a root by root add.
    • A adds B and pairs B's first device through H1, then promotes B, makes B's device a root, and demotes B.
    • A pairs an endorsed second profile of its own member.
    • A removes B's device, then B; B reads removed.
    • Every accepted state verifies from genesis, with 8 Touch IDs for 8 states.
    • Breaking own-device endorsement in edits.ts fails it (endorsement-missing, refused before Touch ID).
    • npx vitest run --project node-timing test/org/org-page.local.test.ts
  • The final set at 2efc964, after merging master afac87f:
    • The hosted call (--gates static,unit,probes,e2e:<every class-1 group but default, connectors-oauth, discover> --runner macos --lane hosted --class1a pool --evidence --peer none), run 40832852899: green, every job succeeded.
    • --gates packaged, run 40832852847: green.
    • The architect reviewed the Org page's screenshots from 40832852899, with classic scrollbars forced, and found nothing blocking. The taste points went to UX: Org page People rows: each name at its first line, and a divider between people #342.
  • The merged head 063460c, after master 1fe1a74 (P5: a machine key speaks for one ref whatever the route (409 key-held), and one member-email grammar #338):
    • class 1a plus e2e:desk-web, run 40843054561: green;
    • e2e:settings, e2e:desk-web-hub and e2e:machines with --evidence, run 40846738615 on tree 063460c: green.
  • The merged head 4ca8ec2, after master bd6b4b0 (O3-B, P5 O3-B: the e2e groups on the daemon shape #336, every e2e group on the daemon shape): this supersedes the two runs above for the landing tree. --gates static,unit,probes,e2e:settings,e2e:machines,e2e:desk-web,e2e:desk-web-hub --runner macos --class1a pool --evidence --peer none, unlaned, run 40851684636: green. e2e:settings passed 14 of 14 on the first attempt, with no flaky lines; org-page.spec.ts:188 passed in 5.9s.
  • The classic-scrollbar runs on the EC2 Mac: e2e:settings was green at d8d7417 (40830513848) and 44175e5 (40831591829). The first run, 40828325127, was the red that found the overflow.
  • e2e:default, e2e:connectors-oauth and e2e:discover, in the architect's slot on 4ca8ec2. Every run's tree is ffb631eba, the same tree as 4ca8ec2, and none had a flaky line.
    • e2e:default, --lane no-hosted --default-beside <the rest of the class-1 set>, run 40867534219: green on the EC2 Mac, 62 passed and 101 skipped.
    • e2e:connectors-oauth, run 40867548462: green on the mini's VM guest, 3 passed.
    • e2e:discover, run 40867803535: green on the mini, 9 passed and 1 skipped.
  • unit:darwin: not run. No file that scripts/darwin-unit-files.sh lists imports a module this branch changes, and the vitest.config.ts change only adds a TIMING_NODE_TESTS entry.
  • Reviews:
    • each of the eight tasks was reviewed at its frontier by a task reviewer, with every Important finding fixed and re-reviewed clean;
    • reviewer-high on 87af670..8cd862d: no material findings;
    • the desk track approved Tasks 1 and 2.

Unresolved Review Findings

  • test/org/org-page.local.test.ts:193, Task 7's review, Minor. The pairing-secret check runs once, after B's first pairing, and compares the code and its payload but not the decoded k. So this file would not catch a later status leaking a code, or one exposing only k. The status builder exposes neither today (src/main/org/pairing.ts:284), and pairing.test.ts pins that the code and k are never in a status. It was left because the unit suite already holds the property; widening this end-to-end check is cheap if wanted.

Residue

  • close() doesn't join the two writers under device/. These are checkRetired's key destruction (src/main/org/org-session.ts, checkRetired) and a fenced rekey's discardNext (org-session.ts, the rekey's cleanup). They write outside org/, so close()'s rule doesn't cover them, and in 20 runs they never tripped the teardown's rm. If one does, join retiredWork and keyWork in shut's third step. The architect amends the existing close() drain tracker row at landing.
  • The countersign flow for a non-signing member's later device (RL §5.2; P5 Decision Log 34). The page states the rule in place of the action, so such a member has no route to a second device yet.

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

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…Edit.live, the state signer's endorsement and guard, checkSuccessor over successorProblems

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…on mark keeps no slot (the store decides again after the mark)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…e under their digest, org.pair.* (pairing.ts, the frozen candidate, H1's pendingOf), OrgRefusal.attempt, the schema and the handlers

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…rg.close() (the adoption queue fenced by the session's guard, its tail returned), the signer's, weekly's and deliveries' close() answering their operation in flight, the commit queue refusing new turns once closed and its tail awaited; a running pairing cancelled; the two test workarounds removed; main's quit waits for it

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…t a storage failure: the lifecycle checked right before each enqueue after an await (the slot's write, the exposure, the discard with no await left before it) and inside the queued reset; the 201-then-sign-out regression case

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… You, People, Machines and Org groups, the change and pairing sheets, the folder's parts), ORG's words, SettingsView's import, and the suites split by group; a refusal under the control its attempt names, one naming none in a row of its own; a pairing ended during Touch ID read apart from one ended before it

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…of on desk-hub's Worker in Miniflare: app A a root through root add adds member B, pairs B's first device through H1 (the fingerprint B's app shows), promotes B and B's device to a root, demotes B, pairs a second profile of its own member endorsed in one Touch ID, removes B's device then B, and the hub's chain verifies from genesis; registered in TIMING_NODE_TESTS

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

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… main has published of the pairing's end, so an expiry during Touch ID reads apart from one before it; an open change or pairing sheet withdraws what would sign once this Mac can't sign, an operation in flight keeping its answer; the pairing sheet says a cancel no longer withdraws a kept proposal and Discard is the way back; SheetForm's default action is optional and the Org sheets use it in place of ActionForm

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…s look through the gate: Settings › Org over a seeded org (a member whose name and email wrap, a member with several devices and roots, a running pairing with its sheet, a refusal naming no attempt; this machine up, two not connected), each group, the window and the pairing sheet attached as PNGs, asserting only that nothing is wider than its box and every action is whole; seeded by src/main/org/page-fixture.ts, org.status and org.view from a schema-checked file through interceptCommand under MAWS_E2E=1 unpackaged, which only a harness build's main contains (__MAWS_HARNESS_BUILD__, a guard the plain build folds away; its unit test checks the plain main)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…orts (the spec writes its file from OrgStatus and OrgView)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… its cell: Setting's label and value cells take min-width 0 and overflow-wrap anywhere (text that fits wraps as before), a text action never shrinks, and the refusal's line, the People footer and a sheet's body break a long name, email or path the same way (org-page.spec.ts's widened name ran 182px into its 168px label column under classic scrollbars, run 40828325127)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…session's org.changed forwarding (registerOrgHandlers' return, called once the fixture installs), so load()'s closing changed(true) can't replace the seeded status after Settings mounts; the unit case drives the real registerOrgHandlers with a late status

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…bars whatever the desktop's (launchMaws' new appKitDefaults, AppleShowScrollBars Always through the argument domain, checked by the settings body's scrollbar taking width); an action is whole only inside its row, every clipping ancestor and the window on all four edges, each scrolled into view first, and two deliberately clipped probes prove the check names them; the overflow check covers every row, cell and block, and the pairing sheet too

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ines name a machine by the org state's name for it (the view's machines, as the Machines group does), else its link's name or This Mac, its ref only when nothing names it; OrgGroup.test.tsx's cases for both; org-page.spec.ts seeds a too-large delivery and a discarded proposal and asserts no seeded machine shows by its ref

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

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… specs with lane-a.spec.ts and org-page.spec.ts

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…d with the view (it raced the view on the gate, run 40831591829)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…dits.ts refuses bad-email through org-protocol's isMemberEmail, hub-client's EMAIL dropped; email-grammar among the pre-sign codes; the admin suite's twin case as #338 left it

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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de93e841b3

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +79 to +80
<Sheet title={title} width="w-[min(560px,90vw)]" onClose={onClose}>
<SheetForm

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bound and scroll the change sheet's preview

When removing a member with many devices, the preview contains one revocation line per device plus additional lines for roots (src/main/org/edits.ts). This sheet renders the entire list without a height limit or scrolling container. The shared Sheet is fixed at top-[18%], and styles/app.css disables document scrolling, so a sufficiently long preview pushes the confirmation buttons below the window with no way to scroll to them. This is particularly easy to reach at the supported 600px minimum window height. Constrain the sheet to the available viewport height and make the preview scrollable so every consequence and the signing controls remain accessible.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

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-29T09:27:13.418974Z de93e84 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.

…o p5-o8-m4a

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM merged commit ecc930b into master Oct 29, 2026
SSFSKIM added a commit that referenced this pull request Oct 29, 2026
…eople and devices; the close() row keeps only the device/ writers

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

One conflict, in src/main/index.ts's import block: O8 M4a's page-fixture import beside remote lane A's; both kept.

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