Skip to content

refactor(site/src/pages/AgentsPage): require always-passed settings and misc props - #29892

Merged
DanielleMaywood merged 1 commit into
mainfrom
nullability/settings-misc
Oct 6, 2026
Merged

DanielleMaywood merged 1 commit into
mainfrom
nullability/settings-misc

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Contributor

Several AgentsPage settings views, header buttons and helpers declared props or parameters optional, but every production caller passes them. AgentSettingsCompactionPage always passes an array for models (from useOrganizationChatModels) plus a compactionModelIDByOrganization map. AgentSettingsUserAgentsPage always passes onRetryOverrides and isRetryingOverrides, and AgentSettingsPersonalSkillsPage always passes isExportingAll. AgentCreatePage always passes enabled/onToggle to ChimeButton and webPush/onToggle to WebPushButton. AgentCreateForm always passes onChange to CompactOrgSelector, and AgentChatInput always passes unsupportedProviderNames to AgentSetupNotice (it defaults the value to [] itself). AgentsPageLayout always passes onToggleSearch. getUsableDefaultModelIDForOrganization, resolveCompactionThreshold, getModelDisplayName and changeColor are always called with non-null values, and UsageRingProgress always gets severity.

These are now required, and the dead defaults, ?./&& guards and fallbacks are gone. ChimeButton and WebPushButton are now controlled-only: the internal chime state, the internal useWebpushNotifications() call and the fallback subscribe/unsubscribe/toast branch are removed. getModelDisplayName keeps isUnsetModelRef, since that also treats "" and the nil UUID as unset. The stories now pass the required args. ChimeButton.stories swaps its click-to-toggle story for an explicit Enabled story, so the two visual states stay covered. Left optional on purpose: aiGatewayDisabled and CompactIntegerField.error/disabled (skip list), and ChatsSidebar.canManageAgentSettings, which is narrowed in #29889.

Part of the AgentsPage nullability cleanup; see #29888 for the methodology. Dead slots for this cluster: 20 before, 1 after (the remaining one is canManageAgentSettings, owned by #29889).

This PR was generated by Coder Agents on behalf of @DanielleMaywood.

@DanielleMaywood
DanielleMaywood marked this pull request as ready for review September 25, 2026 11:03
@DanielleMaywood
DanielleMaywood requested a review from a team as a code owner September 25, 2026 11:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T11:05:45.597520Z e512e57 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DanielleMaywood
DanielleMaywood force-pushed the nullability/settings-misc branch from e512e57 to e235dd0 Compare September 29, 2026 14:26
@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

CODAGT-1258

@DanielleMaywood
DanielleMaywood force-pushed the nullability/settings-misc branch from e235dd0 to d2f8c80 Compare October 6, 2026 08:07
…nd misc props

Settings views, header buttons and small AgentsPage helpers declared
props and parameters optional even though every production caller
passes them. Their defaults, fallbacks and guards were dead.

Make them required and delete the dead handling. ChimeButton and
WebPushButton become controlled-only, dropping their internal chime
state, internal useWebpushNotifications() call and fallback toggle
branch. Stories now pass the required args.
@DanielleMaywood
DanielleMaywood force-pushed the nullability/settings-misc branch from d2f8c80 to 25bf69e Compare October 6, 2026 11:12
@DanielleMaywood
DanielleMaywood merged commit 33b69ff into main Oct 6, 2026
27 checks passed
@DanielleMaywood
DanielleMaywood deleted the nullability/settings-misc branch October 6, 2026 13:19
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 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.

3 participants