Skip to content

ui: split the repository header into a status strip and facts - #813

Merged
HugoXK merged 3 commits into
mainfrom
ops/811-repo-header
Nov 15, 2026
Merged

HugoXK merged 3 commits into
mainfrom
ops/811-repo-header

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Written-by: HugoXK

Fixes #811

risk-tier: T2; basis: src/views/pages.ts

What changed

  • src/views/pages.ts: the repository header is split into:
    • title and target branch;
    • a compact status strip: automatic work, auto/discovery interval, next run, schedule console, FlyBot state and GitHub credential state, plus the last-status badge;
    • a facts line: upstream/fork, GitHub permission, your role and reviewer state.
  • The existing Run now / Plan only / Review now / Workspace / CI gate / Team console actions stay in the header.
  • public/app.css: scoped .repo-head, .repo-head-main, .repo-status-strip and .repo-status styles using existing tokens; the strip wraps to two columns on phones.
  • docs/architecture.md and changelog.d/811-repo-header.changed.md.

Every existing anchor and route is unchanged; the Work page, tabs and danger zone are untouched.

Why

The header was one long sentence carrying the version, cadence, next run, schedule link, status, upstream, fork, permission, role and reviewer. It wrapped on phones and had no visual starting point on desktop. The new structure keeps the same facts but gives the eye a title, a status strip and a facts line.

Ran:

  • npm ci
  • npm run check at f3988de — lint 0, typecheck clean, 1988/1988 tests, build clean
  • node scripts/version.mjs check — 0.3.6 ok
  • node scripts/changelog.mjs check — 41 fragments ok
  • node scripts/risk-gate.mjs --base origin/main — risk-tier: T2; basis: src/views/pages.ts

Not run:

  • No production deploy.
  • No manual browser click-through; the visual matrix runs in CI.

Risk and rollback

Risk: the header now has a wrapping status strip; on narrow widths it becomes two columns rather than one sentence. All existing strings (Auto-iteration on, Auto every, Next, Schedule console) and actions stay, so tests and deep links are unaffected. Rollback: revert the commit; the previous paragraph returns.

Relationship to #804

#804 covers the Work page inside the repository; this PR only changes the header above the tabs. There is no functional overlap.

Docs

docs/architecture.md now describes the title, status strip and facts line.


Published tip (2026-11-15): a78f814c5728ecb3db9a4e9a18b4a96543373216, tree dc68f4a3f727f297086318a74a5a60e3c9aab1e7, parents f3988de4 + 7d1e3ef1, 4 files +31/−6. The conflict was one file: docs/architecture.md, where main's recent-auth preflight sentence sits in the same paragraph this branch rewrote, so both are kept.

@HugoXK-bot HugoXK-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: PASS at f3988de
Written-by: HugoXK-bot
Posted-by: HugoXK-bot

A pure view refactor of the repo page header, and the parts other code depends on are kept.

  1. The status strip is new markup (src/views/pages.ts:1349-1352) but data-next-run and data-next-source still sit on the Next cell, and the two tests that read them still match (test/nextScheduledRun.test.ts:72, :78) with no change to the pattern.
  2. The target-branch line keeps its text and its position in the head block (src/views/pages.ts:1348), and test/pages.test.ts:383 still finds it in its Chinese form.
  3. The new CSS is scoped under .repo-page and uses the existing colour and spacing tokens, so no other page inherits it.

Non-blocking: no new test pins the strip's structure itself, so a later shuffle of the three spans would pass silently. The attributes are covered; the layout is not.

Ran at f3988de:

  • npm run check — pass, 1988/1988 tests, typecheck and build included
  • node scripts/risk-gate.mjs --base 46e686047bc0a6210a006943975f61ea11ee5e3e --head HEAD — risk-tier: T2; basis: src/views/pages.ts
  • node scripts/pr-lint.mjs --pr 813 — pr-lint: ok (#813, T2, 4 files)
  • node scripts/changelog.mjs check — 41 fragments ok
  • node scripts/version.mjs check — 0.3.6 ok
  • node scripts/secret-scan.mjs — no suspected value

Not run: a real browser at 375px and 1440px, so I did not see the wrap myself; the CSS is scoped and uses existing tokens, and the existing page tests pass.

Conclusion: PASS. Presentation-only change, no route, id, attribute or string removed.

@HugoXK-bot HugoXK-bot added the review:approved Issue reviewed and approved by the Fledge Platform Reviewer label Nov 15, 2026
Merge live main. docs/architecture.md had main's recent-auth preflight sentence in
the same paragraph this branch rewrote, so the resolution keeps both.

Written-by: Fledge Platform Dev-3

@HugoXK-bot HugoXK-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: PASS at a78f814
Written-by: HugoXK-bot
Posted-by: HugoXK-bot

Read the tip a78f814c5728ecb3db9a4e9a18b4a96543373216 (4 files +31/−6, T2; src/views/pages.ts blob f069a983 matches the contents API). This supersedes my PASS at f3988de4 only because the forward merge moved the tip.

Findings, none blocking:

  • src/views/pages.ts:1463-1491 — the header keeps repo-head-main, and every fact that moved into the strip reads a value already in scope (repo.auto_iterate, intervalLabel, scheduledNext/nextRunText, flybotAvailable, instance, credentialOk, repo.last_status). No new query, route or store call.
  • src/views/pages.ts:1472 — data-next-run/data-next-source survive verbatim inside the strip, so the existing script hook that updates the next-run cell still matches.
  • src/views/pages.ts:1475-1477 — FlyBot reuses badge(t, instance.status) and keeps the old 未创建/未启用 branches; :1476 uses credentialOk, computed at :1416, so the chip and the run gating cannot disagree.
  • src/views/pages.ts:1478 — the upstream/fork/permission/role/reviewer facts line is unchanged in content and escaping.
  • public/app.css:517-530 — .repo-status is scoped, the 680px band puts two per row, and only the schedule link gets the hover border; no bare span/a rule leaks.
  • docs/architecture.md:306-315 — the paragraph describes exactly this split, and no other doc owns the header.

Ran (exact tip tree; blob hash above verified):

  • npm run check — lint 11 baseline warnings, typecheck clean, 2182/2182 tests, build ok
  • node scripts/pr-lint.mjs --pr 813 — ok (#813, T2, 4 files)
  • node scripts/changelog.mjs check — 63 fragments ok
  • node scripts/version.mjs check — 0.3.6 ok
  • node scripts/secret-scan.mjs — no suspected value in the tracked files

Not run: browser click-through, Docker, the visual matrix locally.

CI at this tip: everything green except review-gate failure 12:21:36Z, which is the pre-verdict state this review replaces.

@HugoXK-bot HugoXK-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: PASS at 9d2232f
Written-by: HugoXK-bot
Posted-by: HugoXK-bot

Read the tip 9d2232fcfc5396a5e535e7ecbdf3f2d0c100c4f5 (merge of a78f814c + live main 9f2ef3aa; 4 files, +31/−6, T2). This supersedes my PASS at a78f814c5728ecb3db9a4e9a18b4a96543373216 only because the forward merge moved the tip.

Faithful rebase: all 714 blobs of tree 9563b8441eb668691183739b5be9d77ad8d75ef2 match the API tree object, and the PR's added/deleted line sets are identical to the tip I passed — the merge added nothing of its own.

The one conflict resolution is correct in both halves:

  • public/app.css keeps main's .work-summary rules and their 680px media query (:517-525) and adds the PR's .repo-status* block after them (:529-535), so neither side overwrote the other.
  • docs/architecture.md keeps main's recent-auth preflight sentence and the PR's new header paragraph in the same paragraph, as described.

The code itself is unchanged from the tip I passed: src/views/pages.ts:1499-1510 splits title, .repo-status-strip (:1503) and the facts line, every value read is one already in scope (flybotAvailable, instance, credentialOk), and data-next-run/data-next-source survive inside the strip at :1506, so the existing script hook still matches.

Non-blocking, for the record before squash: the body's closing line still says "Published tip … a78f814c…" and its Ran: cites f3988de's 1988/1988; the head that will land is 9d2232fc / tree 9563b844, 2192/2192. Also no test pins the new strip — test/ is untouched, so the visual matrix is the only guard on this markup.

Ran (exact tip tree; every blob hash-checked against the API):

  • npm run check — lint 11 baseline warnings, typecheck clean, 2192/2192 tests, build ok
  • node scripts/pr-lint.mjs --pr 813 — ok (#813, T2, 4 files)
  • node scripts/changelog.mjs check — 66 fragments ok
  • node scripts/version.mjs check — 0.3.6 ok
  • node scripts/secret-scan.mjs — no suspected value in the tracked files

Not run: browser click-through, Docker, the visual matrix locally.

@HugoXK
HugoXK merged commit 21ce955 into main Nov 15, 2026
33 of 34 checks passed
@HugoXK
HugoXK deleted the ops/811-repo-header branch November 15, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved Issue reviewed and approved by the Fledge Platform Reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui: split the repository header into a title, status strip and facts

2 participants