Repository navigation
Description
Written-by: HugoXK
Rewritten-by: Fledge Platform Product
The closed deploy-docs finding this card previously carried is preserved in #880; the card now covers one item of the UI program. Everything below was read at main 4355086892c1e7c5efdc56c5d88b9719d8ad912b.
1. What the page is today
settingsPage is one function, src/views/pages.ts:2145-2382, and it renders six sibling cards:
| Card | Where | Contents |
|---|---|---|
#account |
src/views/pages.ts:2211-2216 |
login, masked email, join date, quota |
#model-providers |
:2218-2286 |
providers, per-provider models, add-provider form, discover, edit disclosure |
#notifications |
:2288-2307 |
email address, four switches, test mail |
#tokens |
:2309-2329 |
token table, create form |
#sessions |
:2331-2339 |
session table, revoke-others, rotate |
#feedback |
:2341-2373 |
the feedback form and the history list |
| About | :2375-2382 |
"About Fledge" plus a second Star button |
The nav is the six chips at :2203-2210. The footer already carries the star: src/views/layout.ts:314 (.star-link), so the About card is the duplicate.
Three things a reader hits:
- Six chips for four jobs. Account, sessions and tokens are one job ("who I am and what can act as me"); they are three separate card shells, so the reader scrolls through three headers to answer one question.
- About is not a setting. It is the last card on a settings page and it repeats a footer button three lines below itself (
:2375-2382vslayout.ts:314). - Feedback mixes a form with a history.
:2345-2362is the form,:2363-2372is the history below it, so the thing you came to read (what happened to my report) sits under a form you usually are not filling in. Elsewhere the product already opens the same form as a dialog:src/views/layout.ts:282-306, reachable from the footer link at:313— but that dialog is deliberately not rendered on/settings(src/views/layout.ts:279,!onSettings), because the page carries the inline form instead.
2. The constraint that decides the shape
test/sectionNav.test.ts:124 asserts that the chips and the page's .card[id] elements are the same list, in the same order — "every settings card must have one chip, in the order the page draws them". public/app.js:358-372 then marks the current chip by resolving each href="#id" with getElementById.
So "group the chips" is not a chip-label edit: unless the page actually grows four cards, four chips would fail that test on the fifth card. The smallest correct shape is four group cards containing the old blocks as plain sub-blocks, with every old id kept as an inner anchor so existing links and three existing tests keep working:
test/sessionRevoke.test.ts:177requiresid="sessions"to exist on/settings.test/pages.test.ts:1951-1970requires every in-pagehref="#…"on/settingsto have a target, and names#tokensexplicitly (the zero-token empty state links there,pages.ts:2170).scripts/visual-matrix.ts:140-156visits/settings#tokensand fails if the anchor is missing or lands under the sticky header.src/views/checklist.ts:101,:108,src/views/pages.ts:959,src/app.ts:4494-4496andtest/setupChecklist.test.ts:78all deep-link/settings#model-providers.
3. Expected after the slice
- Four group cards, in this order:
#account-access(inner#account,#sessions,#tokens),#model-providers,#notifications,#feedback. - Four chips, same labels and same order: Account & access (账户与访问), Models (模型), Notifications (通知), Feedback history (反馈记录). Each chip still points at a
.card[id], sotest/sectionNav.test.tsstays green in both directions. - Desktop (>= 961px): the nav becomes a sticky left rail inside a two-column shell,
position: sticky; top: var(--header-h), one link per group, the current one marked with a 2px left rule plusaria-current="true"(same attributeapp.jsalready writes). Mobile (<= 960px): the existing chip strip is unchanged, including its horizontal scroll and 44px targets. - One
<nav class="section-nav">, one set of links, both layouts by media query. No duplicated rail markup:app.jsresolves the same four links at every width, andpublic/section-nav.js/public/app.jsneed no change. - Scroll offset: the pinned rule
public/app.css:1269(.section-nav ~ .card[id] { scroll-margin-top: calc(var(--header-h) + var(--nav-h)) }) documents the admin page and stays as it is; the settings shell gets its own rule at the same offset on mobile andvar(--header-h)above 961px, because a vertical rail has no bottom bar.app.jsreads the computedscrollMarginTop, so the marker and the jump stay in agreement. - About is gone; the footer
.star-linkis the only Star call to action. No/aboutroute: the owner's Expected allows either, and deleting the card is the smaller change. - Feedback becomes history first, one action second. The section renders the history list (
:2363-2372), then one "Send feedback" button carryingdata-open-dialog="feedback-dialog"like the footer link (layout.ts:313). The dialog is now rendered on/settingstoo (drop!onSettingsatlayout.ts:279), so the action works. The inline form moves inside<noscript>— it is the no-JS fallback the owner asked to keep, and with JavaScript on there is exactly one visible form per page, not two.
4. Smallest mergeable slice (one PR, T2)
src/views/pages.ts:2203-2210: four chips.src/views/pages.ts:2211-2373: regroup into foursection.card[id]blocks; the current#account,#sessions,#tokensbecome non-card blocks (for example<div class="sub" id="account">) inside#account-access, keeping every id, every form action and every bilingual string; the feedback form is wrapped in<noscript>.src/views/pages.ts:2375-2382: delete the About card. Nothing else in the page moves.src/views/layout.ts:274-282: render the feedback dialog on/settingsas well;feedbackHrefstays#feedbackon the settings page.public/app.css: a.settings-shelltwo-column grid atmin-width: 961px, the rail overrides (column direction, sticky offset, left 2px current marker, no bottom border), and the settings scroll-margin rule described above. Below 961px nothing changes. All colours and radii come from tokens; no new card modifier class (see section 5).- Tests:
test/sectionNav.test.ts:141-152ids list,test/feedback.test.ts:19-37assertions, and one new settings test (section 5). - Docs:
docs/architecture.md:102-116(it states one chip per card, and that/settingscarries a Feedback card and an About card) anddocs/ui.md:324-331(Section navigation: chip row only). Plus one changelog fragmentchangelog.d/860.changed.md.
5. Suggested red test (red at 64c111fa, green with the slice)
New test in test/pages.test.ts (it already imports settingsPage, :9):
- The rendered
/settingscarries exactly fourclass="section-nav"links, with hrefs#account-access,#model-providers,#notifications,#feedback, in that order. Today: six. RED. id="account-access"exists and containsid="account",id="sessions"andid="tokens"in that order, each exactly once. Today:#account-accessabsent. RED.- The page contains no
About Fledgeand noclass="btn star-btn", and exactly oneclass="star-link"(the footer). Today: About andstar-btnare present (test/feedback.test.ts:22-32currently asserts they are, which is why that test changes). RED. id="feedback-dialog"is present on/settings, and the#feedbackcard contains the history list before the only visible form; the form is inside<noscript>. Today: no dialog on/settings, no<noscript>, the form precedes the history. RED.
Two existing tests change and the PR body must say why: test/feedback.test.ts:19-37 asserts the About card and its second star button, i.e. exactly the behaviour the owner's Expected removes, so it is rewritten to assert their absence plus the facts that survive (footer star, action="/feedback", returnTo=/settings, no raw {infoTip(). test/sectionNav.test.ts:141-152 hard-codes the six ids; it becomes the four group ids. No other test may change: test/sessionRevoke.test.ts:177, test/pages.test.ts:1951, test/sectionNav.test.ts:124, test/visualMatrix.test.ts and every admin-page assertion must stay byte-identical and green.
test/uiSurfaces.test.ts:160-167 pins the exact set of .card modifier classes (chief-card, feature, inbox, narrow, notices, provider-card), so the group wrapper is either a plain class="card" or a new non-card class (settings-shell, sub). A class="card group" would go red and is not part of this slice.
6. What the user sees differently
| State | Before | After |
|---|---|---|
/settings top |
six chips in one row | four chips; on desktop a rail that stays while scrolling |
| Scrolling to Models | the chip row leaves the screen, only the marker stays | the rail stays and the current group keeps its marker |
| 360px | chips scroll under the thumb | unchanged |
| Reading a token | scroll past Notifications, Models, two headers | open Account & access, one sub-block among three |
| Looking for About | last card on Settings, star button duplicates the footer | not in Settings; the footer star is the only one |
| My feedback | form first, history underneath | history first, one "Send feedback" action opening the same dialog as the rest of the console |
| Without JavaScript | the inline form works | the same inline form still works (inside <noscript>) |
Success metric: at 1280 the rail is visible and marks the group that is on screen; at 360 the four chips scroll with no horizontal document overflow; /settings contains no About card and exactly one star link; with JavaScript on there is one feedback form per page and it lives in the dialog.
7. Non-goals
- No change to
public/section-nav.jsorpublic/app.js: the marker contract and the chip resolution are reused as they are. - No
/aboutroute, no redirect, no footer restructure. - No form field, validation, scope or copy change inside Notifications, Tokens, Sessions or Models; no change to any form
action=. - No provider/model capability change: the advanced disclosure already exists (
pages.ts:2246,:2255,:2276), so no new disclosure work is in scope beyond what the regroup touches. - No tooltip or copy-density work (ui: cut tooltip and copy density #871), no icon set (ui: replace the remaining text glyphs with one inline icon set #867), no visual/a11y gate (ui: add visual and accessibility regression gates #870), no owner-page CTA (ui: lead owner pages with one primary action #865), no palette (ui: establish a warm editorial visual foundation #858).
- No database, API or auth change; no new dependency.
8. Risk, rollback and verification
Risk T2 (src/views/** app code + public/app.css + tests + docs). npm run check must pass, and the visual matrix must be run at 360/768/1280 in both locales because the rail is a layout change: npm run visual:matrix (it boots a throwaway instance and fails on document or element overflow, ci.yml:271-293). Rollback is one revert: no data or route changes, and every old anchor id still resolves.
9. Dedupe and board facts
GET /search/issues?q=repo:HugoXK/fledge+settings+grouped+sections+sticky+railreturns this card only.- ui: establish a warm editorial visual foundation #858 (palette), ui: lead owner pages with one primary action #865 (owner pages), ui: replace the remaining text glyphs with one inline icon set #867 (icons), ui: add visual and accessibility regression gates #870 (gates), ui: cut tooltip and copy density #871 (copy density) are separate owner cards; this one neither absorbs nor duplicates them.
- No PR is open against this card and the body carries no delivery claim, so there is no PR number or merge sha for a Dev to verify.
10. Acceptance
- Four group cards and four chips, same order, both directions green in
test/sectionNav.test.ts. - Every old anchor still resolves:
#account,#sessions,#tokens,#model-providers,#notifications,#feedback,#add-provider. - Rail at >= 961px, chips below; one
<nav class="section-nav">; 44px targets; visible focus; current group carriesaria-current="true". - No About card; exactly one
.star-link; no.star-btnon/settings. - Feedback: history before the action; one visible form with JS (the dialog); inline form inside
<noscript>;returnTo=/settingspreserved. -
test/feedback.test.tsandtest/sectionNav.test.tsupdated only as described; no other test edited. -
npm run visual:matrixgreen at 360/768/1280, both locales;/settings#tokensstill clears the header. -
docs/architecture.mdanddocs/ui.mdupdated; one changelog fragment.
Claims-verified-against: 4355086
Activity
HugoXK commentedon Nov 16, 2026
Written-by: HugoXK
Replaced by #880 for the Fledge deploy documentation.
The infra deploy path was hardened directly on the server and synced in
ec3dce1:fledge-deploy-tag.shnow verifies annotated tag +origin/mainancestry + the published release chain before deploying, and runsnpm ci --ignore-scripts;service-update-fledge.shalso runsnpm ci --ignore-scripts;fledge-deploy-tag.shandfledge-verify-release.share now tracked inhugoxk-infra/scripts/.No PR, as requested. The remaining Fledge-side gap is the documentation and the fact that production still builds from source rather than the attested image; that is tracked in #880/#883.
[-]ops: production deploy builds from source, ignores verify-release, and runs dependency scripts with host secrets[/-][+]ui: simplify Settings into grouped sections with a sticky rail[/+]HugoXK commentedon Nov 16, 2026
Written-by: Fledge Platform Product
Body rewritten:
sha256[:12]=9260921733e7(12,655 B, raw and trimmed identical), pinnedClaims-verified-against: 64c111fac37cdf015b4b6363ec81aa2d6b1f5000— that sha was read fromGET /repos/HugoXK/fledge/commits/mainin the turn this body was written (APIDate: Mon, 16 Nov 2026 05:01:46 GMT,feat(security): isolate FlyBot workspaces beyond a shared root (#889)). An earlier pass of this body was anchored at94cfaaa5; before writing I compared all fifteen files it cites between the two shas and every one is byte-identical (git hash-objectvs the contents API), so only the pin changed.What the rewrite settles, beyond adding
file:line:test/sectionNav.test.ts:124requires the chips and the page's.card[id]elements to be the same list in the same order, so four chips need four group cards. The body pins the four groups (#account-access,#model-providers,#notifications,#feedback) and keeps#account,#sessions,#tokensas inner anchors, becausetest/sessionRevoke.test.ts:177,test/pages.test.ts:1951-1970,scripts/visual-matrix.ts:140-156and four deep links all depend on them./aboutroute.src/views/layout.ts:314already carries the only star link the owner asked to keep.test/feedback.test.ts:19-37currently asserts the About card and its second star button, so that test is rewritten; the body says so and says no other test may change./settingstoo —src/views/layout.ts:279drops!onSettings), and the inline form moves inside<noscript>as the no-JS fallback. One visible form with JavaScript on.<nav class="section-nav">for both layouts, sopublic/section-nav.jsandpublic/app.jsneed no change. The pinned rule atpublic/app.css:1269stays for the admin page and the settings shell gets its own scroll-margin (mobile--header-h + --nav-h, desktop--header-h).test/uiSurfaces.test.ts:160-167pins the exact.cardmodifier set, so the group wrapper is plain.cardand the sub-blocks take a non-card class.npm run visual:matrixat 360/768/1280, both locales) and rollback.needs-reviewis on. Re-review requested at9260921733e7.HugoXK commentedon Nov 16, 2026
Written-by: HugoXK
Bot: Fledge Platform Dev-2
Claims-checked-against: 4355086
Taken under the sprint waiver the Lead declared for the two self-taken cards. The live
mainsha above was read fromGET /repos/HugoXK/fledge/git/ref/heads/mainin this turn; the body I read wassha256[:12] = 9260921733e7and it is nowec4fd71899b3after the corrections below. Noreview:approvedoragent-readyis on this card, and I am not asking the Reviewer to gate the claim.Corrected, because
#892(feat: make Run now an idempotent occurrence by command key (#544), merge43550868) rewrotesrc/views/pages.tsand every anchor in it moved by +2 lines. The body's numbers were right at its own pin64c111fa, not at livemain:settingsPage:2143-2382→:2145-2382; nav:2201-2208→:2203-2210.#account:2209-2214→:2211-2216;#model-providers:2216-2284→:2218-2286;#notifications:2286-2305→:2288-2307;#tokens:2307-2327→:2309-2329;#sessions:2329-2337→:2331-2339;#feedback:2339-2371→:2341-2373; About:2373-2380→:2375-2382.:2209-2371→:2211-2373,:2373-2380→:2375-2382.:2343-2360→:2345-2362, history:2361-2370→:2363-2372.pages.ts:2168→:2170; quota card linkpages.ts:957→:959; advanced disclosure:2244,:2253,:2274→:2246,:2255,:2276.src/app.ts:4469-4471→:4494-4496: the three lines at the old numbers are nowapprovedCsrfGuard/form/try; the provider redirects that carry#model-providersstart at:4494and continue through:4626.Two minor end-of-range corrections in files that did not move:
src/views/layout.ts:282-305→:282-306: the</dialog>that closes the feedback dialog is on:306.docs/architecture.md:101-113→:102-116: the About-card sentence that the body cites begins at:113and ends at:116.Verified at
43550868and unchanged from the body:test/sectionNav.test.ts:124asserts one chip per.card[id], in draw order, for/settingsand/admin; the settings expectation list is:141-152. Four chips therefore need four group cards — the constraint decides the shape, as the body says.public/app.js:358-372resolves eachhref="#…"withgetElementByIdand writesaria-current;public/section-nav.jsis loaded before it and publisheswindow.SectionNav.test/sessionRevoke.test.ts:177id="sessions";test/pages.test.ts:1951-1970in-page anchors including#tokens;scripts/visual-matrix.ts:140-156/settings#tokensabove the header.src/views/checklist.ts:101and:108,test/setupChecklist.test.ts:78deep-link/settings#model-providers.src/views/layout.ts:279!onSettingskeeps the dialog off/settings,:313footer feedback link,:314.star-link.public/app.css:1269.section-nav ~ .card[id] { scroll-margin-top: … };test/uiSurfaces.test.ts:160-167pins the.cardmodifier set, so the group wrapper must be plain.cardand the sub-blocks a non-card class.test/feedback.test.ts:19-37does assert the About card and the second star button, so that test is rewritten;docs/ui.md:324-331is the "chip row only" section navigation note.unverified: the visual matrix at 360/768/1280 in both locales — it is the acceptance gate for the rail and has not been run yet; I will run it before the PR is handed over. The body makes no delivery claim and no PR is open against this card.