Skip to content

refactor(site/src/pages/AgentsPage): return normalized line stats from getChatDisplayConfig - #29903

Closed
DanielleMaywood wants to merge 1 commit into
nullability/sidebarfrom
nullability/sidebar-line-stats
Closed

DanielleMaywood wants to merge 1 commit into
nullability/sidebarfrom
nullability/sidebar-line-stats

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #29889.

getChatDisplayConfig returned the raw diff_status, and both ChatTreeNode and ChatSearchResults re-derived the same line stats from it (?? 0 defaults plus a url && (a > 0 || d > 0 || c > 0) check). It now returns lineStats: { additions, deletions, changedFiles } | undefined, defined only when diff_status.url is set and at least one count is positive, which is the exact condition both callers used. Both callers render from lineStats, the getChatDiffStatus passthrough is deleted, and the doubled PRIcon && prIcon check becomes prIcon && <prIcon.icon />. No behavior or DOM change.

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 on ChatsSidebar, ChatSearchDialog, and SidebarTabView stories.

Plan excerpt

Analysed on a local, unpushed merge of all cleanup branches; ranking script topdown.cjs. 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
T4 Sidebar: getChatDisplayConfig returns normalized lineStats instead of raw diffStatus; delete getChatDiffStatus; drop doubled PRIcon && prIcon ~8 plus duplication in 2 files 3 files / -15 net None

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

@DanielleMaywood
DanielleMaywood force-pushed the nullability/sidebar-line-stats branch from bef84d5 to 9440605 Compare September 29, 2026 14:35
@DanielleMaywood
DanielleMaywood marked this pull request as ready for review September 29, 2026 14:46
@DanielleMaywood
DanielleMaywood requested a review from a team as a code owner September 29, 2026 14:46
@chatgpt-codex-connector

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-29T14:47:39.743709Z 9440605 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.

@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

CODAGT-1258

@DanielleMaywood
DanielleMaywood force-pushed the nullability/sidebar-line-stats branch from 9440605 to 204d333 Compare October 6, 2026 08:10
@DanielleMaywood
DanielleMaywood force-pushed the nullability/sidebar-line-stats branch from 204d333 to 3734e8a Compare October 6, 2026 11:16
@github-actions github-actions Bot added the stale This issue is like stale bread. label Nov 1, 2026
@github-actions github-actions Bot closed this Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This issue is like stale bread.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants