Skip to content

Commit 75dc270

Browse files
committed
Merge remote-tracking branch 'origin/main' into docs/reconcile-plan-with-code
2 parents a3605ae + 5e97aa3 commit 75dc270

11 files changed

Lines changed: 1298 additions & 11 deletions

File tree

‎AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ For features with background jobs, polling, retries, cancellation, or shutdown:
2424
- Clear a submitted draft only if its current value and attachment still match what was submitted. Treat this as compare-and-swap behavior.
2525
- Preserve completed historical results, but visibly mark them stale when their snapshot, plan revision, assignment, or referenced code no longer matches.
2626
- When polling updates one part of the screen, update only that state. Preserve scroll position unless the user was already following the bottom.
27+
- While a request is in flight, do not disable the control that has keyboard focus; disabling it drops focus to the page. Mark it `aria-disabled`, ignore repeat activation with an in-flight guard, and test that focus stays on the control after the response.
2728
- When a row or control's visual selection determines the current content or input, expose the same state with the appropriate accessibility attribute, such as `aria-current` or `aria-selected`, and test it across navigation.
2829

2930
## Required race regressions

‎docs/implementation/issue-prioritization.md‎

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,58 @@ dedicated read-only gateway with these boundaries:
6666

6767
H1-H3 own dedicated issue retrieval, normalization and ranking modules plus
6868
their tests and this document. They do not edit the Store, runner, shared web
69-
shell, package files or CI. H4 waits for G4 to release shared web files and will
70-
record explicit trust decisions through the then-current storage owner.
69+
shell, package files or CI.
70+
71+
**Schedule change (2026-09-25, approved by the product owner).** H4 was planned
72+
to wait for G4 to release the shared web files. G cannot start until E4 merges,
73+
and E4 waits for D5, so the web files had no active owner. H4 therefore takes
74+
them now, split in two:
75+
76+
- **H4a (this change): the Issues screen.** It owns `web/server.ts`,
77+
`web/public/*`, a new `web/issues.ts`, the demo fixture
78+
`scripts/demo-issues.ts` and their tests. It does not edit `runner/store.ts`.
79+
It hands the web files to G when G1 starts.
80+
- **H4b: the "trust this issue" action.** It records trust decisions through
81+
the storage owner (F) after F1's Store changes land, so the two lanes do not
82+
both bump the schema version.
7183

7284
H1 is complete when this policy and access inspection are committed. H2/H3 are
7385
complete when dedicated tests prove normalized retrieval, deterministic reasons,
7486
stable tie-breaking, trust classification, bounded failure, and stale versus
7587
unavailable states, and `npm run typecheck` passes.
88+
89+
## H4a: Issues screen
90+
91+
**What you see.** "Issues" in the app bar opens a ranked table: rank, issue
92+
number and title (a link to GitHub), labels, one line of reasons, score, trust
93+
and the date it was opened. Trust shows "✓ Collaborator" or "! Needs trust".
94+
The status line says one of:
95+
96+
- "✓ Current": the list was retrieved at the time shown;
97+
- "! Stale": the last good list is shown, with the time and error of the
98+
failed refresh;
99+
- "✕ Unavailable": no list has been retrieved yet, with the error;
100+
- "– Not configured": the review configuration has no `github.repository`.
101+
102+
A note says that trusting issues and queueing are not available yet. Demo mode
103+
shows fixture issues and never contacts GitHub.
104+
105+
**State holders.**
106+
107+
| Holder | Owner | Lifecycle |
108+
| --- | --- | --- |
109+
| Retrieval (`gh` subprocesses) | `IssueBoard` in `web/issues.ts` | One refresh at a time, under an abort controller owned by the server. Concurrent requests join it. The gateway timeout is 12 seconds, below the 15-second request timeout. |
110+
| Last good list | `IssuePrioritizer` (H3) | Kept in memory only. After a restart, the first failure is "unavailable", not "stale". |
111+
| HTTP requests | `web/server.ts` | `GET /api/issues` reads the current view without fetching. `POST /api/issues` with `{"action":"refresh"}` starts or joins a refresh. A request that is aborted stops waiting but does not cancel the shared refresh. |
112+
| Rendered screen | `web/public/app.js` | A generation number discards a response that a newer refresh has replaced. Switching screens hides and shows views without re-rendering, so review drafts, selections and focus stay. |
113+
114+
**Shutdown.** The server rejects new requests, drains admitted requests within
115+
the grace period, then aborts the refresh and awaits the gateway's settlement
116+
before closing storage.
117+
118+
**Evidence.** `test/issue-board.test.ts` covers joining, a departing request,
119+
stale after success, shutdown abort-and-await, endpoint validation and the
120+
unconfigured state. `test/browser/issues.spec.ts` covers ranked order, reasons,
121+
trust marks, `aria-current` navigation, review input kept across navigation,
122+
review shortcuts ignored on the Issues screen, the unavailable → current → stale
123+
sequence, a late refresh after leaving the screen, and the 1280px layout.

0 commit comments

Comments
 (0)