Repository navigation
fix: bring two frontend files back under the 2,000-line cap - #36181
Conversation
main failed its whole-tree line-cap gate: KiroPrerequisiteGate.tsx had 2,002 lines and dashboardSlice.ts had 2,001. The two agent-spec setup screens move from KiroPrerequisiteGate.tsx into KiroPrerequisiteAgentSpecs.tsx. The DashboardState interface moves from dashboardSlice.ts into store/dashboard/state.ts, and the slice re-exports it, so every caller keeps its import path. The moved lines are unchanged and nothing behaves differently.
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: A person should decideWhy: the decider estimates a 5% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 744 lines, more than the 400 it may approve on its own. I recommend approving. This PR only moves code to bring two files back under the 2,000-line cap. The two agent-spec screens move unchanged into KiroPrerequisiteAgentSpecs.tsx; the only edit is an added An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. This is a move-only split: one file is re-exported and only types moved in the other, so nothing renders differently and every caller imports from the same path. Notes
[DESIGN-REVIEWED] fba4236 Description read[DESCRIPTION-READ] 1d13c76a6db021584a861b10097908b483253f7edf0dcada272aaf14f9ee5724 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: both items are verbatim moves of whole definitions, mandated by the AGENTS.md 2,000-line cap, with import paths preserved. What this change shipsInventory (2 items) — 2 justifiedIntent: get
[FIRST-PRINCIPLES-REVIEWED] fba4236 Description read[DESCRIPTION-READ] c1fba2a5e1a2ebc7d8d8875a0d8966bfaf91c89f8b6756e4042336333be524d7 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. This PR only moves code: the two setup screens move to a new file with their lines unchanged except for an [UX-REVIEWED] fba4236 Description read[DESCRIPTION-READ] ef7acc3c47724c74668f1b134116b1cf70ea1aed0a541c65f7282ebc1a7fd8a0 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (4 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: code move only: two frontend files are split under the 2,000-line cap; the moved blocks are unchanged apart from imports and exports.
Problem / Motivation
Goal:
mainpasses its whole-tree line-cap gate again: no hand-written code file is over 2,000 lines.Two frontend files on
mainare over the cap:Why it matters
The
ratchet-gateslane of the Main Ratchet Audit is red on everymaincommit, so that audit cannot show a new drift. The next pull request that touches either file fails its own line-cap check for lines it did not add.Not a goal
What changed (motivation → approach → change)
Whole definitions move into a new sibling module. The original file stays the import path that callers use.
website/src/components/KiroPrerequisiteGate.tsxwebsite/src/components/KiroPrerequisiteAgentSpecs.tsx(186 lines)website/src/store/dashboardSlice.tsDashboardStateinterfacewebsite/src/store/dashboard/state.ts(193 lines)dashboardSlice.tsre-exportsDashboardState, so every caller keepsfrom '../store/dashboardSlice'. The move is type-only: it adds no runtime code and nothing a test patches.KiroPrerequisiteGate.tsx. fix(onboarding): keep other coding agents collapsed on a fresh config #35993 merges cleanly with this head (git merge-tree). fix(onboarding): hold first run behind kiro sign-in when kas_bundle is on #31793 already conflicts withmainin that file; its hunks are in the gate component itself, which this change does not touch.Backwards compatibility
Compatible: every moved line is unchanged, apart from
exporton the two screen components. Import paths that callers use are the same.Removes nothing: no key, setting, API or stored data is removed or renamed.
Tests
Proof: not provable -- frontend test (prove.py runs Python only)
No test is added or changed: the gate that was red is the test. Run in the worktree on this head:
python3 scripts/check_file_line_cap.py --whole-treemain's)RATCHET_SCOPE_WHOLE_TREE=1 python3 scripts/check_file_line_cap.py(how the audit runs it)python3 scripts/check_file_line_cap.py(how a pull request runs it)Also run, all passing:
python3 scripts/check_file_line_cap.py --test;test/test_file_line_cap.py(134 tests);npx tsc -p tsconfig.app.json;eslinton the four files; the fiveKiroPrerequisiteGatetest files (269 tests); thedashboardSlicetests, the tests undersrc/store, and the two tests that read the slice's source text (73 files, 1,140 tests).A script compared the old and new files line by line: every line removed from the two files is in its new file.
Per-file coverage from the
KiroPrerequisiteGatetests alone:KiroPrerequisiteAgentSpecs.tsx100% of statements,KiroPrerequisiteGate.tsx97.34%.state.tsholds types only.Manual verification
Not run in a browser. The change moves code without editing it, and the type check and the component tests above cover it.
Screenshots / video
Why no screenshot: the two screens render from the same lines in a new file, and the other move is a type. No pixel changes.
Related Issues
Closes #35295
Sibling sweep
Swept: python3 scripts/check_file_line_cap.py --whole-tree
Sibling: website/src/components/KiroPrerequisiteGate.tsx -- changed here
Sibling: website/src/store/dashboardSlice.ts -- changed here
Pattern harvest
Rule candidate: a pull request's line-cap check judges the merge with
mainas it was when CI last ran, and nothing re-runs it at merge time. #30587's last CI run started at 11:17Z on 11-11, when its 20 added lines leftKiroPrerequisiteGate.tsxunder the cap; #35224 and #35258 then added 17 lines to the same file before it merged. #35662's last CI run started 95 seconds before #33825 added one line todashboardSlice.ts, so its 3 lines landed on 1,998, not 1,997. A merge queue, or a re-run of the cheap whole-tree gates whenmainmoved in a file the pull request touches, would have caught both.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)