Fix UI lint regression in live-topology-card.tsx#16
Merged
rowantrollope merged 1 commit intomainfrom May 6, 2026
Merged
Conversation
PR #14 (live topology redesign) landed before PR #13 cleared the UI lint baseline, but #13's branch was at an older base when Phase 9 ran. After both merged, main carried four @typescript-eslint/no-unnecessary- condition errors in live-topology-card.tsx: - displayAgentPrimaryName: agent.hostname?.trim() ?? "" -> .trim() (hostname is typed string, both ?. and ?? are dead). - displayAgentPrimaryName: agent.sessionId?.trim().slice(...) -> drop ?. (sessionId is typed string). - workspace grouping: ws.databaseName?.trim() || "Unassigned database" -> drop ?. (databaseName is typed string). The CI ui-lint job is blocking since Phase 9; main was red until this fix. Build, 60/60 vitest tests, and lint all green locally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix four
@typescript-eslint/no-unnecessary-conditionerrors inui/src/components/live-topology-card.tsxthat broke theui-lintCI job on main after #15 merged.#13's Phase 9 cleared the UI lint baseline (27 → 0) and made the
ui-lintCI job blocking. #14 (live topology redesign) introduced new optional-chain / nullish-coalesce uses on fields that the type system already proves non-null, but the timing meant Phase 9's lint sweep didn't see them. After both #14 and #15 landed on top of #13, main was red onui-lint.What's fixed
agent.hostname?.trim() ?? ""agent.hostname.trim()hostname: stringis required; both?.and??are deadagent.sessionId?.trim().slice(0, 8)agent.sessionId.trim().slice(0, 8)sessionId: stringis requiredws.databaseName?.trim() || "..."ws.databaseName.trim() || "..."databaseName: stringis requiredBehavior is unchanged when the runtime values match the TypeScript types (which they should, per the API contract).
Test plan
cd ui && npm run lint— clean (was 4 errors, now 0)cd ui && npm run build— cleancd ui && npm test— 60/60 passnpm run dev— Live Topology card renders the same agent/workspace names as before (visual no-op)🤖 Generated with Claude Code