refactor(web): split base.css by section (pinned import order) and api.ts by domain #197
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab!197
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/195"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The two mechanical splits from the line-cap policy (#193). Both are behavior-preserving: no visual change, no import-path change for any caller. Rebased 2026-07-25 onto main
3ec0c68, porting main's additive changes to both files (Settings IA css from #198, container-runner API surface from #205/#207) into the split layout.base.css →
web/src/styles/(27 files, pinned import order)base.cssstays the entry point but now contains only a header comment and 27@importlines; Vite inlines them in order, so the cascade is pinned exactly as before.settings-ia.css, imported last to match its append-at-end cascade position.chat.cssat 584 lines; all far under the 2000 CSS cap.Proof of visual no-op: the concatenation of the 27 files in import order diffs clean against main's
base.css(only prettier-trimmed blank lines at slice edges differ), and the production build emits a byte-identical CSS asset vs a fresh origin/main build — same content hashindex-Dg3Jci_b.css, sha256-verified. The sandbox has no browser, and identical emitted CSS is a strictly stronger guarantee than a visual smoke.api.ts →
web/src/api/(15 domain modules, pure barrel)api.tsis now a pure barrel (export * from './api/…'in original section order); all ~36 importers of'../api'are untouched, as isapi.test.ts(under cap, left whole per the issue).// --- … ---banners:core(BASE, request, ApiError, errorMessage, setUnauthorizedHandler),auth,credentials,repos,providers,runs,chat,spawn(parked + spawn defaults),issues,secrets,afk,tokens,push,settings,crs. Types moved with their endpoints. Main's container-runner additions (#205/#207) landed in their home modules:Runner+ repo fields inrepos, thecontainer_*setting keys insettings.api.ts: nothing removed; the only additions reaching the barrel arerequest(core) andcoerceBool(settings), which had to be exported for cross-module use. The import graph is a DAG.Verification (on the rebased head)
tsc --noEmit+vite buildgreen; emitted CSS hash identical to an origin/main build (see above).vitest run: 64 files, 933 tests passed.eslint .andprettier --check .clean.Sequencing note (#193)
#193 has not landed yet, so there is no
baseline.jsonto delete entries from — that acceptance item is a no-op today. Whichever lands second: if #193 lands after this, its baseline seed (computed at branch time) simply won't includebase.css/api.ts; if #193 lands first, regenerate the baseline on this branch before merge (one command per #193) so the two entries drop out, as the ratchet enforces.Closes #195
[autoland] verdict: pass
Clean PASS. CI green (ci / native success, run 221). Behavior-preserving verified independently: the 26 styles/*.css files concatenated in @import order are content-identical to the original base.css; api.ts barrel has zero export drops (only additive request + coerceBool, both disclosed). Title conventional, Closes #195 present, diff scope exactly the two splits. No baseline.json on main yet, so the #193 sequencing item is a no-op.
acde43dd50964a79c486Rebased onto current main (
3ec0c68, was 62 commits behind) and re-ported the split over main's additive changes to both files:7da7d61). It becomes a new 27th filestyles/settings-ia.css, imported last — matching its append-at-end cascade position, so global rule order stays untouched by construction.f446550,f4d5d74):Runnertype +runner/container_*/image_reffields onRepoandRepoPatchwent intoapi/repos.ts; thecontainer_pids/container_nofile/container_memorysetting keys went intoapi/settings.ts. All ported verbatim, same relative positions. The barrel is unchanged.Re-verification on the rebased head (
964a79c):base.css(blank-line-insensitive, as before).index-Dg3Jci_b.css, sha25611052d74…on both sides.api.ts: zero drops; the only additions remain the previously disclosedrequest(core) andcoerceBool(settings).tsc --noEmit+vite buildgreen;vitest run64 files / 933 tests passed;eslintandprettier --checkclean.Still no
baseline.jsonon main, so the #193 sequencing note is unchanged.[autoland] verdict: pass
PASS. Relied on green Forgejo CI (all 4 checks success: ci/native, ci-nix/flake-check, agent-tools/smoke, agent-tools/publish) — not re-run.
Behavior-preserving verified independently on the rebased head:
Title Conventional Commits, Closes #195 present, diff scope exactly the two splits. No CONCERNS.