Skip to content

feat(site): move lifecycle settings to AI settings#26625

Merged
DanielleMaywood merged 7 commits into
mainfrom
move-lifecycle-ai-settings
Jun 24, 2026
Merged

feat(site): move lifecycle settings to AI settings#26625
DanielleMaywood merged 7 commits into
mainfrom
move-lifecycle-ai-settings

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Contributor

Moves the Coder Agents lifecycle settings into AI Settings and keeps the legacy Agents settings lifecycle URL redirecting to the new location.

Updates the lifecycle forms to match the new AI Settings layout and only show Save for the individual dirty setting form.

Note

🤖 This PR was written by Coder Agent on behalf of Danielle Maywood

@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-06-24 08:30 UTC by @DanielleMaywood
Spend: $83.39 / $100.00

Review history
  • R1 (2026-06-23), 2 P3, COMMENT. Review
  • R2 (2026-06-23): 17 reviewers, 2 Nit, 1 P2, 10 P3, COMMENT. Review
  • R3 (2026-06-23): 6 reviewers, 2 Nit, 1 P2, 13 P3, COMMENT. Review
  • R4 (2026-06-24), 2 Nit, 1 P2, 13 P3, COMMENT. Review
  • R5 (2026-06-24): 4 reviewers, 2 Nit, 1 P2, 13 P3, APPROVE. Review

deep-review v0.9.0 | Round 5 | a306311..5b23c57

Last posted: Round 5, 16 findings (1 P2, 13 P3, 2 Nit), APPROVE. Review

Finding inventory

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P2 Author fixed (6c11e3d) AgentSettingsLifecyclePageView.stories.tsx Story count dropped 33 to 7; error-state, validation-boundary, and toggle-off stories removed without replacement R1 Netero No
CRF-2 P3 Author fixed (6c11e3d) RetentionPeriodSettings.tsx:32 Deleted "keep in sync with coderd/exp_chats.go" comments from three files; coupling still exists R1 Netero Yes
CRF-3 P3 Author fixed (6c11e3d) LifecycleSettingLayout.tsx:78 error && guard ineffective; Fragment always truthy so wrapper div always renders R1 Netero Yes
CRF-4 Nit Dropped by orchestrator (indirect coverage through page stories acceptable per project norms for internal layout components) LifecycleSettingLayout.tsx:1 No dedicated story for LifecycleSettingLayout and DaysField R1 Netero No
CRF-5 P3 Author fixed (fb07fa6) LifecycleSettingLayout.tsx:40 Native HTML5 form validation on DaysField can silently block form submission when toggle is off R2 Netero Yes
CRF-6 P2 Author fixed (fb07fa6) WorkspaceAutostopSettings.tsx:48 Unconditional .required() and .max() outside when("enabled") block saving disabled state when input has invalid value R2 Nami P2, Hisoka P3 Yes
CRF-7 P3 Author fixed (fb07fa6) LifecycleSettingLayout.tsx:40 onSubmit typed () => void but form relies on caller to call preventDefault; type contract hides event requirement R2 Hisoka, Mafuuu, Leorio, Nami, Zoro, Kite, Chopper, Meruem, Razor Yes
CRF-8 P3 Author fixed (fb07fa6) AgentSettingsLifecyclePageView.stories.tsx:196 Missing validation boundary stories for auto-archive and debug retention; only retention and autostop covered R2 Bisky, Mafu-san Yes
CRF-9 P3 Author fixed (fb07fa6) ChatsSidebar/settings/SettingsPanel.tsx:219 Stale internal link to /agents/settings/lifecycle forces unnecessary redirect hop R2 Kite Yes
CRF-10 P3 Author fixed (fb07fa6) LifecycleSettingLayout.tsx:56 Input fields always render and remain interactive when toggle is off; edits are silently discarded on save R2 Mafuuu, Nami Yes
CRF-11 P3 Author fixed (fb07fa6) WorkspaceAutostopSettings.tsx:54 Magic number 3_600_000 (1hr) used twice without named constant; siblings extract their defaults R2 Gon Yes
CRF-12 P3 Author fixed (fb07fa6) RetentionPeriodSettings.tsx:48 Bare 30 fallback without generated constant; siblings use DefaultChat*Days from typesGenerated R2 Gon, Razor Yes
CRF-13 P3 Author fixed (fb07fa6) RetentionPeriodSettings.tsx:93 Error message "Failed to save retention setting" ambiguous; should say "conversation retention" R2 Leorio Yes
CRF-14 Nit Author fixed (fb07fa6) WorkspaceAutostopSettings.tsx:39 validationSchema inside component body; can be hoisted to module scope now that closure over state is removed R2 Nami, Zoro, Meruem, Kite Yes
CRF-15 Nit Author fixed (fb07fa6) LifecycleSettingLayout.tsx:113 DaysField hardcodes min=1 max=3650 without sync comment that the three Yup schemas carry R2 Gon, Leorio, Robin Yes
CRF-16 Nit Dropped by orchestrator (divergence is correct because DurationField doesn't set touched; Pariston verified) WorkspaceAutostopSettings.tsx:83 hasError omits touched check unlike sibling settings R2 Mafu-san, Mafuuu, Chopper, Razor No
CRF-17 P3 Author fixed (b3b2305) RetentionPeriodSettings.tsx:28 Sync comment references non-existent DefaultChatRetentionDays constant in typesGenerated R3 Netero, Mafu-san Yes
CRF-18 P3 Author fixed (b3b2305) AgentSettingsLifecyclePageView.stories.tsx:207 Boundary stories never trigger onBlur/tab so form.touched never set; error message rendering untested R3 Bisky Yes
CRF-19 P3 Author fixed (b3b2305) ChatsSidebar/settings/SettingsPanel.tsx:218 Lifecycle nav item uses internal-link pattern but links outside agents area; should match Providers/Models external-link pattern R3 Mafuuu Yes
CRF-20 Nit Dropped by orchestrator (pre-existing name; rename is scope creep) AutoArchiveSettings.tsx:29 ENABLE_DEFAULT_DAYS breaks DEFAULT_ naming pattern R3 Gon No

Round log

Round 1

Netero-only. 1 P2, 2 P3, 1 Nit (1 dropped). CRF-1 included in body (no reviewer line for file-level finding). Reviewed against a306311..57342b1.

Round 2

Panel (17 reviewers). CRF-1/2/3 verified fixed. 1 P2, 8 P3, 2 Nit new. 1 Nit dropped. Reviewed against a306311..6c11e3d.

Round 3

Panel (6 reviewers). CRF-5 through CRF-15 verified fixed. 3 P3, 1 Nit new (1 dropped). Reviewed against a306311..fb07fa6.

Round 4

CRF-17/18/19 verified fixed. All findings resolved. Reviewed against a306311..b3b2305.

Round 5

Panel (4 reviewers). Structural file move from AgentsPage to AISettingsPage/LifecyclePage. No new P3+ findings. All prior fixes intact. Reviewed against a306311..5b23c57.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

First-pass review (Netero). This is a mechanical check only; the full review panel has not yet reviewed this PR.

The refactor cleanly deduplicates four near-identical settings components into LifecycleSettingLayout and DaysField, and the route move + redirect is correct. The behavioral change from immediate-mutation toggles to form-dirty-then-save is a good UX improvement.

3 findings: 1 P2, 2 P3. The panel will review after these are addressed.

"Story count dropped from 33 to 7" is a 79% reduction in test surface for code that still has the same number of behavioral paths.


P2 [CRF-1] AgentSettingsLifecyclePageView.stories.tsx: Story count dropped from 33 to 7. Error-state, validation-boundary, and most toggle-off stories were removed without replacement.

Removed coverage includes:

  • Error state rendering (8 stories): AutoArchiveSaveError, AutoArchiveLoadError, RetentionSaveError, RetentionLoadError, DebugRetentionSaveError, DebugRetentionLoadError, DefaultAutostopToggleFailure, DefaultAutostopToggleOffFailure. The error display code still exists in all four components, but zero stories exercise it.
  • Validation boundaries (6 stories): DefaultAutostopExceedsMax, AutoArchiveExceedsMax, AutoArchiveBelowMin, RetentionExceedsMax, RetentionBelowMin, DebugRetentionExceedsMax, DebugRetentionBelowMin. Only InvalidRetentionDisablesSave remains, covering one case for one setting.
  • Toggle-off behavior (4 stories): Only DirtyAutostopToggle tests toggle-off. Auto-archive, retention, and debug retention toggle-off paths are untested.

The behavioral model changed (toggle no longer fires immediate mutations), so old stories are not directly portable. But validation schemas, error display code, and toggle-off submit paths are unchanged and now lack coverage. (Netero)

🤖 This review was automatically generated with Coder Agents.

Comment thread site/src/pages/AgentsPage/components/RetentionPeriodSettings.tsx

Copy link
Copy Markdown
Contributor Author

🤖 This comment was written by Coder Agent on behalf of Danielle Maywood 🤖

Restored focused coverage for the remaining lifecycle paths while keeping the story set smaller than the previous full matrix. The stories now cover error rendering, representative validation boundaries, and toggle-off dirty-save submit paths across the settings.

@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Panel review (round 2, 17 reviewers). Prior findings CRF-1/2/3 all verified fixed.

The LifecycleSettingLayout extraction is well done. Four near-identical settings components collapsed into a single 79-line shared layout. The behavioral shift from immediate-toggle-save to explicit-save-on-dirty simplifies state management by eliminating four independent useState + reset-handler pairs. Route move with redirect is correct.

12 new findings: 1 P2, 8 P3, 2 Nit, 1 dropped. The P2 is a real user-facing functional bug in WorkspaceAutostopSettings where unconditional validation blocks saving the disabled state.

Process observation: the hasError touched-check divergence in WorkspaceAutostopSettings (4 reviewers flagged it) is intentional; DurationField doesn't expose onBlur to Formik, so touched is never set. Adding the guard would suppress validation errors entirely. Consider adding a one-line comment to explain the divergence for future readers.

Mafuuu: "The user sees an active Save button for edits the submit handler will discard when the toggle is off."


site/src/pages/AgentsPage/components/ChatsSidebar/settings/SettingsPanel.tsx:219

P3 [CRF-9] Stale internal link to="/agents/settings/lifecycle" in the Chats sidebar. The redirect works for external bookmarks, but the codebase controls this link and should point directly to /ai/settings/lifecycle. The redirect hop is unnecessary for internal navigation.

(Kite)

🤖

🤖 This review was automatically generated with Coder Agents.

Comment thread site/src/pages/AgentsPage/components/WorkspaceAutostopSettings.tsx
Comment thread site/src/pages/AgentsPage/components/LifecycleSettingLayout.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/LifecycleSettingLayout.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/WorkspaceAutostopSettings.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/RetentionPeriodSettings.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/WorkspaceAutostopSettings.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/LifecycleSettingLayout.tsx Outdated

Copy link
Copy Markdown
Contributor Author

🤖 This comment was written by Coder Agent on behalf of Danielle Maywood 🤖

CRF-9 fixed in fb07fa6164. The chat settings panel Lifecycle link now points to /ai/settings/lifecycle; the legacy router redirect remains in place for existing /agents/settings/lifecycle URLs.

@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review (round 3, 6 reviewers). All 11 findings from round 2 verified fixed. The fix commit was thorough: generalized from specific findings rather than patching only the cited instances; story count went from 7 to 29 with systematic coverage across all four settings.

3 new P3 findings, none blocking.

Bisky: "The rewritten suite is genuinely good. 29 stories, every assertion targets real rendered output, no fakes, no mocks of mocks, no fragile timing."

🤖 This review was automatically generated with Coder Agents.

Comment thread site/src/pages/AgentsPage/components/RetentionPeriodSettings.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatsSidebar/settings/SettingsPanel.tsx Outdated
@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All findings resolved across 4 rounds (20 findings: 2 P2, 12 P3, 3 Nit raised; 17 fixed, 3 dropped). CRF-17/18/19 fixes verified in b3b2305.

This PR started as a settings relocation with significant test coverage loss, grew through three fix rounds into a well-structured refactor with better test coverage (38.3% test density, up from 14.3% in the original submission), honest type contracts, consistent validation patterns, and complete sidebar navigation.

The author-agent responded to every finding, generalized fixes to siblings rather than patching only cited instances, and added regression stories for each behavioral fix. No open findings remain.

🤖 This review was automatically generated with Coder Agents.

@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Round 5 panel (4 reviewers + Netero). No new findings. The structural file move from AgentsPage/components/ to AISettingsPage/LifecyclePage/components/ is clean: zero stale references, all imports updated, all 17 prior fixes intact across the move, redirect preserved.

5 rounds, 20 findings raised, all resolved. Test density grew from 14.3% to 46.1% (29 stories). Clean to merge.

Mafu-san: "Scope matched intent. PR title says 'move lifecycle settings to AI settings.' R5 commit is +37/-37 lines of import path updates and renames. No scope creep, no silent feature changes, no 'while I'm here' edits."

🤖 This review was automatically generated with Coder Agents.

@DanielleMaywood DanielleMaywood marked this pull request as ready for review June 24, 2026 08:52
@DanielleMaywood DanielleMaywood marked this pull request as draft June 24, 2026 09:02
@DanielleMaywood DanielleMaywood marked this pull request as ready for review June 24, 2026 09:06
@DanielleMaywood DanielleMaywood merged commit 791b4b6 into main Jun 24, 2026
34 of 36 checks passed
@DanielleMaywood DanielleMaywood deleted the move-lifecycle-ai-settings branch June 24, 2026 09:15
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants