Repository navigation
Implement add-dashboard-account-menu (account + logout dropdown) - #248
Merged
Merged
Conversation
Realizes the ratified add-dashboard-account-menu change. - serve.py: /capabilities gains a per-request, DISPLAY-ONLY `hosted_actor` field read from the gateway-stamped X-Auth-Request-User header (null off the gateway), beside the existing per-request `repository`. Additive to the unversioned shape; no verdict or route consults it — the credential-free dashboard authorizes nothing on it (D16 boundary holds). - web/views/account-menu.js (new): the corner user-icon dropdown, following the settings.js popover contract (body-anchored aside, Escape/outside-click close, aria, DOM-safe textContent). Shows "Signed in as <hosted_actor>", the access level derived from /capabilities.actions (read-only when no gate/edit/session, else the granted names — no new flag), and a logout link to /logout shown ONLY when hosted_actor is present. Local mode shows the local actor / "local session" and no logout. - index.html: #accountbtn (👤) in .cornerbtns beside theme + settings. - app.js: initAccountMenu once in main(), fed the probed capabilities each render (no second fetch). - Tests: test_hosted_actor.py (header→hosted_actor, absent/blank→null, and the invariant guard: actions map byte-identical with/without the header, a gated write stays refused with it present); test_account_menu_dom.py (node/DOM, hosted vs local, logout gating, textContent-only). test_notebook_action.py exact-shape assertion accommodates the additive field like console_token. Verification: full dashboard suites green (3836 passed, 13 skipped); openspec validate --strict and --all --strict green. Live browser proof deferred to post-deploy (the menu renders hosted_actor only behind the gateway). Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
Pull request overview
Implements the ratified add-dashboard-account-menu OpenSpec change by surfacing a display-only hosted identity on /capabilities and adding a top-right account dropdown (identity, derived access level, and hosted-only logout) wired into the dashboard UI.
Changes:
- Add per-request, display-only
hosted_actorto/capabilitiessourced fromX-Auth-Request-User(null when absent). - Introduce
web/views/account-menu.js+ styling and wire it intoindex.html/app.js(single bind + capability-driven updates). - Add regression tests for hosted_actor behavior (including “authorizes nothing”) and DOM-level account menu behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/ideation-dashboard/test_notebook_action.py | Keeps exact capabilities payload pin by popping the new additive hosted_actor field. |
| tests/ideation-dashboard/test_hosted_actor.py | Verifies hosted_actor present/absent/blank behavior and that it does not affect capability gating. |
| tests/ideation-dashboard/test_account_menu_dom.py | Node/DOM probe covering rendering, open/close behavior, logout gating, and textContent-only binding. |
| scripts/ideation_dashboard/web/views/account-menu.js | New account dropdown view/controller (identity, derived access level, hosted-only logout). |
| scripts/ideation_dashboard/web/styles.css | Adds styles for the account button and dropdown panel. |
| scripts/ideation_dashboard/web/index.html | Adds the 👤 account button with aria wiring. |
| scripts/ideation_dashboard/web/app.js | Wires account menu init once and updates it from probed capabilities each render. |
| scripts/ideation_dashboard/serve.py | Adds hosted_actor field to /capabilities response from request headers. |
| openspec/changes/add-dashboard-account-menu/tasks.md | Marks tasks completed and records verification notes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
809
to
818
| const probedCaps = await probeCapabilities(); | ||
| // Hand the corner account menu the freshly probed verdict — it reads the | ||
| // signed-in identity (`hosted_actor`) and derives the access level from this | ||
| // SAME object, so it needs no fetch of its own. The RAW probe (before the | ||
| // composed read-only strip below): the account menu states the serve's own | ||
| // posture and identity, not the composed view's stripped affordances. | ||
| if (accountMenu) accountMenu.update(probedCaps); | ||
| // D10: a composed render strips every acting capability in ONE place, so | ||
| // every view's existing capability check is the whole gating. | ||
| const caps = composed ? readOnlyCaps(probedCaps) : probedCaps; |
brettheap
pushed a commit
that referenced
this pull request
Aug 22, 2026
Realized: implementation merged (#248) and green (full dashboard suites 3836 passed), and DEPLOYED to QA — dox-dashboard rolled to the account-menu image (Omnigent-Install #121, digest 65e9a293), live-verified in-pod: /capabilities echoes hosted_actor from X-Auth-Request-User (null without), index.html carries #accountbtn, account-menu.js serves with /logout, wheel default 0.5. `openspec archive` promotes the four ideation-dashboard requirements into the spec and moves the change under archive/2026-08-22-. Drops the now-archived active entry from the README OpenSpec Records. `openspec validate --all --strict` green (65). Co-Authored-By: Claude Opus 4.8 <[email protected]>
brettheap
added a commit
that referenced
this pull request
Sep 7, 2026
…nattended cycle (#738) * Tick §5 of mirror-floor-regeneration-automation: the first observed unattended cycle Brett Heap, in session, 2026-09-06T23:24Z, verbatim "merge 732 when green, then tick section 5 in both packets". Every box ticks only on the observed evidence written on its line; a box the evidence does not reach stays open and says why. Ticked: 5.2 (codexFactory run 34024535671 opened #248, no operator ran the generator), 5.3 (run 34066668104 opened #732 with no operator copying a digest; the five sites read back from the merged squash 9ffc625, not from the lane's report; snapshot bytes hash equal to the floor at 19f2ab0c), 5.4 (pytest-suite 34066687673 green with the freshness verifier passing BY NAME against the candidate core; skipped==21 unchanged), 5.7 (two refusal kinds observed on real runs, quoted: GitHub's workflows-permission push refusal on seven runs before #726, and the binding's own loud mint refusal on four runs until the grant). Open, with reasons: 5.1 (promotion-free cycle under the ruled pin-only reading; covered-pending 0 throughout), 5.5 (three human merges observed and quoted; the count never left zero so its return cannot be observed), 5.6 (wall time recorded -- 14 h 22 min 33 s end to end; 3 h 21 min from the last floor move; 23 s sweep-to-PR once mintable -- and stated not to be the unattended figure: three repairs and a grant wait sat inside it). 6.4 carries a dated TAKEN note in two parts (the named grant proven by use on run 34024566099; the workflows extension given 20:25Z, visible on the mint at 23:21Z). No requirement text moves; no pin moves. Drafted by an Opus author that died on its session limit; completed by the orchestrator (disclosed). Refs codexFactory #232 Lane: openxfactory-2 * Take Copilot round 1 on #738: state the ticked and open boxes as two plain sentences Lane: openxfactory-2 --------- Co-authored-by: Brett Heap <[email protected]>
This was referenced Sep 7, 2026
brettheap
added a commit
that referenced
this pull request
Sep 7, 2026
…try, the withheld verdict, and the amendment that must not be written Still PROPOSAL ONLY. No schema byte moves, no version is cut, every box unticked. One BLOCKER and four MAJOR findings landed; each correction says what the first draft got wrong rather than reading as though it had always said this. B1 (BLOCKER) — THE CHAIN RULE PRESUMED A PATH THE CONTRACT NEVER DEFINES. Measured, not argued: all four OpsxFactory locators carry an `opsx:opensoft/` scheme prefix, and THREE of the four targets exist at no ref under their literal path because they moved when their packets archived (add-tenant-reader-grant-pipeline -> archive/2026-08-21-…; add-managed-service-inventory -> archive/2026-08-22-…; add-managed-service-mapping -> archive/2026-08-26-…); only the live add-managed-node-inventory target resolves literally. So `reason: archive_move` was UNADMITTABLE BY CONSTRUCTION — at an archive commit the target is absent at `commit` under the old path and absent at `commit^` under the new one, both named refusals. A member no conforming record can ever use is a mistake, not a member. Fixed four ways: (1) a normative clause — a repository holding instruments SHALL DECLARE a custody store mapping resolving a locator to a retrievable target; an unresolvable locator is a refusal and a checker that INFERS an undefined path is nonconformant, because an inferred rewrite manufactures agreement with a file nobody pinned; (2) each entry gains `previous_locator` / `observed_locator` (closed, required, equal when the target did not move), the `commit^` leg evaluated at the former and the `commit` leg at the latter, so a move re-derives AT BOTH PATHS — C-3's table renumbered 8 -> 10, new decision C-6a; (3) scenarios for a path move re-derived at both paths and for a pair that resolves at neither; (4) the worked example is corrected — it had used a resolved archive-form locator for an instrument whose real locator is scheme-prefixed and whose target is LIVE, contradicting this packet's own finding. Two examples now, both quoted verbatim from the records: A (bytes moved, path did not) and B (path moved, bytes did not). M1 — `diff_class: content` bought currency by omission; design said the class was in no leg, which admitted exactly what C-5 locks out. New C-9: a `content` entry WITHHOLDS the verdict — a third outcome beside current and refused, because "the evidence re-derived and shows the referent moved" is a different fact from "the evidence could not be re-derived" and goes to a different owner. Grounds for re-execution, not recording. Brett's F.1 record-and-accept was for a content-UNCHANGED edit only. M2 — the instructed "one `amendments` entry" would have transitioned three EXECUTED instruments to `amended` under the promoted requirement "Amendments Are Transitions, Never New Instruments" (D7), asserting the parties' terms changed to record that a repository moved a file under an unchanged pin. New C-10: the structured entry IS the record, no `amendments` entry, status stays `executed`; carve-out stated in the MODIFIED requirement, in § Impact, and removed from tasks/design. THIS SUPERSEDES ONE CLAUSE OF THE F.1 RULING (PR #248 comment 5571629298) and says so at the point of supersession — that clause predates the choice announced in the same sentence, since the amendment was the prose half of the form being replaced. Flagged as an operator veto point (task 1.3). M3 — no ancestry leg: `at` is author-supplied recording time, so a reachable non-ancestor commit passed every leg with HEAD matching by coincidence. Added: each entry's commit is an ancestor of the next, and the last is an ancestor of HEAD, plus a refusal scenario. M4 — C-1's second leg was inverted. Being under `check_custody`'s blob-shape walk is the PROTECTION, not the hazard, and the sibling siting left `ruling_ref` and `recorded_by` — the two unbounded free strings — outside the only "wherever it hides" guard. C-1 restated to stand on its first leg, and task 3.5 extends `walk_strings` over both fields with a negative fixture (4.8b). MINORS: scenarios for a HEAD digest matching no terminus and for entries out of recorded-time order, with a matching negative fixture (4.3c) so §4's "one per named refusal" is true; "Depth 0" -> "Depth 1"; the 57fd9fd2 edit was one `+Ratified:` line per target, NOT a `Status:` header (verified in the commit message and the per-target diff — the enum members it grounds are unchanged); `ruling_ref` stated in requirement text as a declared pointer no checker resolves; forward-dated archive citations marked "(archive in flight; the live path until then is …)"; and the C-7 obligation made explicit — a repository whose instruments declare `custody_rederivations` SHALL OPERATE a custody-digest check, which is the line between a contract and a convention. Gates at this head: pinned openspec CLI 1.12.0 --change 1 passed / 0 failed and --all --strict 97 passed / 0 undispositioned (2 pre-existing accepted exceptions); modified-block currency 0 uncarried against canon; sequenced-after 39 active + --ledger-diff consistent (180 rows); scope-globs pass; consent-instruments 0 errors; manifest-digests 188 verify; pytest sequenced_after + proposal-support + scope_globs 330 passed, 2 subtests. The ledger row's moved_by "#757" is now known WRONG — that number was taken by another lane — so task 0.1's re-stamp is mandatory, not tidy-up. Lane: opsXfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01SdF4BiCNseq3B2HFzkN3SJ
This was referenced Sep 8, 2026
brettheap
added a commit
that referenced
this pull request
Sep 21, 2026
…ured from the API (#1127) Lane: openxfactory-2 (openXfactory-2) **THE WORD, verbatim: "do 1 and 2, claim 5"** — Brett Heap, 2026-09-21T20:24:51Z, in session to lane `openxfactory-2` (display `openXfactory-2`), recorded on openxFactory [#745](#745 (comment)) (comment 5767008640). **Item 1 is this box**: measure the THIRD consecutive cycle for `extend-merge-master-envelope-to-floor-bot-lanes` § 4.2 and record it. **THE RESULT: THE THIRD CYCLE EXISTS, IT WAS FULLY UNATTENDED, AND THE BOX TICKS.** The brief allowed for the opposite outcome — that `floor-regeneration` had reported "nothing owed" hourly since 2026-09-10T17:22Z and there had been no third cycle, in which case the box stays open with a dated "still two" annotation. That is not what the API says: the lane owed nothing until **2026-09-18**, and then ran. ## The measurement — codexFactory half, three consecutive cycles | # | pull request → merge | merged at | merged by | human acts | |---|---|---|---|---| | 1 | [#314](codeXfactory/codeXfactory#314) → `b08958ae` | 2026-09-09T23:27:22Z | `openxfactory[bot]` | **ONE** — `brettheap` re-dispatched the approval leg (run `34407492987`, `run_attempt` **2**, `triggering_actor` `brettheap`). The 2026-09-10 note's "one hand dispatch", now verified independently | | 2 | [#325](codeXfactory/codeXfactory#325) → `df42f803` | 2026-09-10T01:55:14Z | `openxfactory[bot]` | **NONE** | | 3 | [#491](codeXfactory/codeXfactory#491) → `b21f0100` | 2026-09-18T22:50:17Z | `openxfactory[bot]` | **NONE** | **Cycle 3 in full.** codexFactory #491, head `floor/bot-regeneration` at `2e45de457b543e14edbfc9188b7f007696ed7c73`, author `openxfactory[bot]`, base `main`, opened 2026-09-18T22:23:53Z, merged 26 min 24 s later, changing exactly one path — `floor/openxfactory-review-authority-floor.yaml` (+4 −3). Auto-merge enabled by `openxfactory[bot]` three seconds after opening. Every timeline actor a bot (`openxfactory[bot]`, `github-actions[bot]`, `sonarqubecloud[bot]`, `codexfactory[bot]`), no human among them. All four head runs at `run_attempt` 1, `triggering_actor` `openxfactory[bot]`, on `pull_request`/`pull_request_target`. Approving evaluation run [`35403220985`](https://github.com/codeXfactory/codexFactory/actions/runs/35403220985) (`check_suite`, `triggering_actor` `openxfactory[bot]`) submitted review `5253277461` as `codexfactory[bot]` at 22:50:04Z. **The decisive negative: every one of the 128 `floor-regeneration` runs in codexFactory since 2026-09-10 fired on the `schedule` event, and NOT ONE on `workflow_dispatch`.** No approval leg was hand-dispatched anywhere in the window covering cycles two and three. (A scheduled run renders `triggering_actor: brettheap` because GitHub attributes cron to the workflow's last committer; the `event` is `schedule` and it is not a human act. Stated out loud because the field invites the opposite reading.) **Consecutive, proved rather than assumed.** The only commit on codexFactory `main` touching `floor/openxfactory-review-authority-floor.yaml` since 2026-09-10T02:00Z is `2e45de45` (#491's own). The only other `floor/bot-regeneration` pull request in the eight-day gap is **#382**, box 3.3's constructed negative control — authored by `brettheap`, titled "NEVER MERGE", closed unmerged. No cycle was skipped, parked, or human-merged between #325 and #491. ## The before/after figure **BEFORE, re-measured the same way rather than quoted forward:** codexFactory #248 (`7f147070`), #254 (`307d38f1`), #265 (`aced582b`), #273 (`4b12ba83`) were each merged by `brettheap`, and so was each paired openxFactory re-pin — #732 (`9ffc6252`), #747 (`d5a549e4`), #764 (`8d92bfaf`). #273 → `4b12ba83` and #764's title *"Advance the pinned decision core to `4b12ba83…`"* are one matched pair, which is what makes the pairing a measurement. **Two human merges per advance of the pinned core, one per repository.** **AFTER — human MERGES per advance: ZERO**, across all three cycles and, as of cycle three, in both repositories. **Human ACTS per advance: ONE**, and it is the openxFactory re-pin half's **approving review** — the half decision N-1's recommended scope deliberately left under a human word. Cycle three is the first cycle in which that half ran as a bot pull request at all, so it is the first whose figure is readable end to end: openxFactory [#1122](#1122), head `bot/review-lane-repin` at `7fd34286`, author `openxfactory[bot]`, titled *"Advance the pinned decision core to `b21f010013fa51960c77377a8582943435b6db32`"* — **#491's own merge sha, which is what ties the two halves into ONE cycle rather than two coincidences** — opened 2026-09-18T23:24:43Z with auto-squash enabled by the bot, **APPROVED by `brettheap` at 2026-09-19T00:53:32Z** after waiting 1 h 28 min 49 s, merged by `openxfactory[bot]` **five seconds after that approval** at 2026-09-19T00:53:37Z, merge `38f826c2`. `contracts/review-lane-pin.yaml:60` on `main` now reads `core_commit: "b21f010013fa51960c77377a8582943435b6db32"` — the cycle is closed end to end. **The cost fell from two human merges to one human approving review, and the button itself is now bot-pressed in both repositories.** Cycles one and two have no re-pin artifact of their own (§ 3.4's standing finding); their pin advance was folded into hand-authored openxFactory #922, authored *and* merged by `brettheap` 2026-09-10T21:55:20Z. That is why the end-to-end figure is measured over one cycle while the **admitted** lane's own half — all this packet changed — is measured over three, which is what the box's text asks for. ## Two things this hands other boxes — named, not performed 1. **#491's approval record renders `Candidate class: openxfactory-floor-regeneration` in full**, with the kill-switch sentence beside it. The `unrecorded` rendering that § 3.1 and the council record's **R-7** stay open on is **FIXED on the live approval path**. § 3.1 is not this box's to tick and is left open for its own author to read the run. 2. The sibling packet `admit-review-lane-repin-to-merge-approval-envelope` was RATIFIED WITH AMENDMENT holding realization until *"the third unattended codexFactory cycle is measured and the unrecorded-class fix is observed on a live approval"*. **Both preconditions are met by the evidence above.** Recorded for that packet's author rather than acted on here. Its enrolment is still absent from openxFactory `.github/merge-approval-envelope.yml` (sole candidate remains `expected_head_ref: intents/rolling`) — which is *why* #1122 needed the human review, so the reading is consistent rather than merely compatible. Also superseded: `amend-kill-switch-to-declared-test-companion`'s premise that no bot cycle exists to observe ("nothing owed" since 2026-09-10T17:22Z) was true when written and is not any more. Named, not acted on. ## What this pull request changes **One file, 135 insertions, 1 deletion:** `openspec/changes/extend-merge-master-envelope-to-floor-bot-lanes/tasks.md`. - § 4.2 ticked `[x]` with a dated **2026-09-21** annotation carrying the whole measurement. - A dated **2026-09-21** superseding section appended at the end, stating the 2026-09-10 addendum table's row `| § 4.2 human cost after | OPEN | two consecutive cycles measured; the box requires three |` as **history** and giving its current state as **TICKED**. **A JUDGMENT, STATED RATHER THAN BURIED.** The brief directed the summary table row to be edited. That row exists in exactly one place in the repository — `tasks.md:830` — and it sits inside a table the file's own rule opens with: *"APPENDED, NOT A REWRITE."* Editing a dated record in place would break the discipline every prior act in this file kept. So the row is **superseded by a later dated section** — the same form PR #927's superseding paragraph and the 2026-09-11 sections used, and for the same reason. Nothing dated is rewritten. **The checklist state after this PR:** open by their own text — 3.1, 3.4, 3.6, 4.1, 4.4 (`grep -n '^- \[ \]'` confirms exactly these five). § 4.2 leaves that list; 29 boxes ticked. **The packet is NOT archived** — § 4.4 is separately open by its own text and this PR does not touch it, and § 4.1's evidence set is not assembled while 3.1, 3.4 and 3.6 stand open. ## Validation, all run in the foreground on this head | command | result | |---|---| | `OPENSPEC_TELEMETRY=0 openspec validate extend-merge-master-envelope-to-floor-bot-lanes --strict` | **valid** | | `OPENSPEC_TELEMETRY=0 openspec validate --all --strict` | **106 passed, 1 failed** (107 items). The one failure is `add-chain-attestation` (`signed-execution-chain/spec.md`, a MODIFIED block omitting a scenario) — pre-existing on `origin/main` and untouched by this PR, whose diff is one file in a different change directory. Note for the record: COMMON.md expects *two* pre-existing failures; `add-composed-view-authoring` is no longer among the active changes, so only one remains | | `python3 scripts/proposal-support.py . verify` | **proposal support verification ok** | | `python3 scripts/validate-sequenced-after.py . --ledger-diff` | **per-change sweep ledger consistent with the corpus (222 rows)**; 44 active + 178 archived; deepest declared chain 4 hops | | `python3 scripts/doc-health.py --single-repo . --family modified-block-currency` | **exit 0**, 12 findings, all `severity=info class=contested`, **0 naming this packet** — all pre-existing in other change packets. This PR adds no spec delta, so it cannot move this family | Lands under Rule 6 on Brett Heap's landing word when the eight required checks are green and Copilot is clean. refs #745 🤖 Generated with [Claude Code](https://claude.com/claude-code) ## Summary by Sourcery Complete the § 4.2 measurement by documenting three consecutive API-verified cycles and the resulting reduction in human intervention. Enhancements: - Record the third consecutive post-change cycle and confirm the per-cycle human cost decreased from two human merges to zero, with one approving review remaining in the end-to-end cycle. Chores: - Mark checklist item § 4.2 complete while preserving dated historical entries through an appended superseding record.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the ratified
add-dashboard-account-menuchange (spec merged in #246).What's built
/capabilitiesgains a per-request, display-onlyhosted_actorfield read from the gateway-stampedX-Auth-Request-Userheader (nulloff the gateway), beside the existing per-requestrepository. Additive to the unversioned shape; no verdict or route consults it.web/views/account-menu.js(new) — the top-right user-icon dropdown, following thesettings.jspopover contract (body-anchored aside, Escape/outside-click close, aria, DOM-safetextContent). Shows "Signed in as <hosted_actor>", the access level derived from/capabilities.actions(read-only when nogate/edit/session, else the granted names — no new flag), and a logout link to/logoutshown only whenhosted_actoris present. Local mode → local actor / "local session", no logout.#accountbtn(👤) in.cornerbtns;initAccountMenuwired once inmain(), fed the probed capabilities each render (no second fetch).The invariant, tested
test_hosted_actor.pyproves the display-only rule, not just asserts it: on a hosted (non-loopback) plane theactionsmap is byte-identical with and without the stamped header, and a gated write stays refused with the header present. Plus header→value, and absent/blank→null.test_account_menu_dom.py(node/DOM) covers hosted vs local rendering, logout gating, andtextContent-only.Verification
openspec validate add-dashboard-account-menu --strictand--all --strict: green (66/66).compileall+node --checkclean.Realizes the change's code surface; ready to archive
add-dashboard-account-menuon merge.🤖 Generated with Claude Code