GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(site/src/pages/AgentsPage): split ChatTopBar into chatless frame and loaded bar by DanielleMaywood · Pull Request #29902 · coder/coder

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Stacked on #29890.

ChatTopBarProps.chat was optional only because the loading, error, and not-found views rendered the bar without a chat. The loaded page always passes a Chat. This splits the component:

  • ChatTopBarFrame renders the shared layout (back button, sidebar expand button, title area, PR slot, share slot, panel toggle). The loading and not-found views in AgentChatPageView.tsx and AgentChatPageErrorView.tsx use it directly, with the same no-op panel toggle as before.
  • ChatTopBar now requires chat: Chat and fills the frame's slots, removing the repeated chat?., chat !== undefined, and chat ? ... : false checks.
  • getParentChatID now requires a Chat; the undefined test case is removed.
  • The NoTitle story renders ChatTopBarFrame, keeping its story ID and screenshot.

Rendered markup is unchanged for every view.

Part of the AgentsPage nullability cleanup; see #29888 for the methodology.

Verified: pnpm lint:types, pnpm check, pnpm lint:oxlint, pnpm lint:compiler, pnpm lint:knip, pnpm test src/pages/AgentsPage, and pnpm test:storybook for ChatTopBar, AgentsPageLayout, and AgentChatPageView stories.

Plan excerpt

Analysed on a local, unpushed merge of all cleanup branches; ranking script local only. After the bottom-up PRs only 43 dead slots remain, so what's left is nullability that is real at its origin. Two read-only agents reviewed the top origins in code. Guard counts from the tool overstate the win: many "guards" are real branches (loading, no workspace, first/last row).

# Change Guards removed Size Risk
T2 Split ChatTopBar into ChatTopBarFrame (used by loading/error/not-found views) and ChatTopBar({ chat: Chat }) ~14 chat checks, getParentChatID(undefined) ~6 files / 75 lines Low; keep frame DOM identical

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot assigned DanielleMaywood Sep 25, 2026
@DanielleMaywood
DanielleMaywood force-pushed the nullability/chat-input branch from b008dba to 064e2a8 Compare September 29, 2026 14:29
@DanielleMaywood
DanielleMaywood force-pushed the nullability/chat-top-bar branch from 6aed723 to 64dc088 Compare September 29, 2026 14:45
@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

CODAGT-1258

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DanielleMaywood
DanielleMaywood force-pushed the nullability/chat-input branch from d8a8364 to e1401d6 Compare October 6, 2026 08:07
DanielleMaywood added 3 commits October 6, 2026 11:07
@DanielleMaywood
refactor(site/src/pages/AgentsPage): require always-passed chat input…
4916957
… props

AgentChatPage, AgentChatPageView, ChatPageContent, AgentCreateForm
and AgentChatInput always pass the composer, page shell, attachment
preview and skills menu props below, but the receiving components
still declared them optional and defaulted or guarded them.

Make them required and drop the dead defaults and guards:
AgentChatPageView and its loading view props, ChatPageTimeline and
ChatPageInput editor, MCP and loading props, AgentChatInput
initialValue/onContentChange/plan mode/catalog loading,
ChatMessageInput, SkillsTriggerMenu and AttachmentPreview callbacks
and flags. ChatMessageInput always autofocuses, so its autoFocus prop
is removed. Tests and stories now pass the values production sends;
the story for plan mode without a toggle handler is removed.
@DanielleMaywood
refactor(site/src/pages/AgentsPage): require non-null context usage i…
b87fff6
…n the indicator (#29905)
@DanielleMaywood
refactor(site/src/pages/AgentsPage): drop dead chat page null checks (#…
42a5dc8
…29907)
@DanielleMaywood
DanielleMaywood force-pushed the nullability/chat-input branch from e1401d6 to 42a5dc8 Compare October 6, 2026 11:13
@DanielleMaywood
refactor(site/src/pages/AgentsPage): split ChatTopBar into chatless f…
fff2b48
…rame and loaded bar
@DanielleMaywood
DanielleMaywood force-pushed the nullability/chat-top-bar branch from 64dc088 to fff2b48 Compare October 6, 2026 11:18
Base automatically changed from nullability/chat-input to main October 6, 2026 12:30
@github-actions github-actions Bot added the stale This issue is like stale bread. label Oct 31, 2026
@github-actions github-actions Bot closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@DanielleMaywood DanielleMaywood

Labels

stale This issue is like stale bread.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@DanielleMaywood
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.