Skip to content

fix(website): drop a duplicate Modal import that broke every build - #6924

Closed
iamwhatever wants to merge 1 commit into
mainfrom
fix/duplicate-modal-import
Closed

fix(website): drop a duplicate Modal import that broke every build#6924
iamwhatever wants to merge 1 commit into
mainfrom
fix/duplicate-modal-import

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Problem

website/src/pages/ChannelPage.tsx imports Modal twice — line 2 and line 16 —
so the TypeScript compiler reports:

src/pages/ChannelPage.tsx(2,8): error TS2300: Duplicate identifier 'Modal'.
src/pages/ChannelPage.tsx(16,8): error TS2300: Duplicate identifier 'Modal'.

This is on main (ba65da1e8), not on a feature branch.

Why it matters

Every build and typecheck lane runs tsc, so this single line fails five checks
at once — Frontend Lint & Type Check, Build Wheel, Build Desktop
(ubuntu-22.04), Build Desktop (ubuntu-22.04-arm) and E2E — on main and
therefore on every open pull request in the repository, none of which can
reach a green state until it is fixed. I hit it as an unrelated README-only
change showing five build failures.

Fix

Symptom: five unrelated-looking build failures on a diff that touches no
TypeScript. Root cause: not the diff at all — tsc runs in every one of those
lanes, so one duplicate identifier on the merge base fans out across the whole
matrix. Delete one of the two identical imports.

git log shows how it got there: line 2 already had the import, and
07eaab978 (fix(channels): name errors with shared modal) added a second one
next to the DetailPanel import. Removed the later one, so line 2 — the original
— stays and the import block keeps its existing order.

Tests

  • tsc --noEmit — clean (was 2 errors).
  • eslint src/pages/ChannelPage.tsx --max-warnings 0 — clean.
  • vitest run on the four ChannelPage suites
    (ChannelPage.clearContext, ChannelPage.ime, ChannelPage.menuKeyboard,
    ChannelPageCoverage) — 84 passed.

Manual verification

  1. grep -n "components/Modal" website/src/pages/ChannelPage.tsx before: lines 2
    and 16. After: line 2 only.
  2. Confirmed the duplicate is on origin/main itself, so this is a
    base-branch breakage rather than a merge artifact.
  3. Diff is 1 file, +0, −1.

Why no screenshot: the diff deletes a second import Modal from '../components/Modal' — the identical import of the identical module that line 2
already performs — so the binding Modal refers to the same component before and
after, no JSX changes, and the emitted bundle is unchanged. The file only tripped
the frontend-surface path filter; there is no rendered state to capture, and a
screenshot of ChannelPage would be evidence of nothing.

ChannelPage.tsx imported Modal twice, at lines 2 and 16, so tsc reported
TS2300 Duplicate identifier 'Modal'. Every build and typecheck lane runs tsc,
so one line broke Frontend Lint & Type Check, Build Wheel, both Build Desktop
jobs and E2E -- on main and therefore on every open pull request.

The second import arrived in 07eaab9 (fix(channels): name errors with shared
modal) next to the DetailPanel import, while line 2 already had it. Removed the
later one; line 2 is the original and keeps the import block's existing order.
@iamwhatever
iamwhatever requested a review from a team August 30, 2026 05:09
@iamwhatever
iamwhatever requested a review from a team as a code owner August 30, 2026 05:09
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of aba11faf736f95a7892fc7775563cd70b513b573 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

The diff is a one-line removal of a duplicate Modal import in ChannelPage.tsx (the line-2 import remains and all usages still resolve). No user-facing strings, layout, flows, or rendered pixels change — nothing for a UX lens to catch.

UX-Verdict: PASS

Build-fix only — deletes a duplicate import; zero change to any rendered surface, string, or flow.

[UX-REVIEWED] aba11fa

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of aba11faf736f95a7892fc7775563cd70b513b573 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Minimal, correctly-scoped one-line fix for a verified base-branch build breakage; no design surface to question.

[DESIGN-REVIEWED] aba11fa

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of aba11faf736f95a7892fc7775563cd70b513b573 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

The checkout at HEAD confirms the fix: ChannelPage.tsx now imports Modal once (line 2), and Modal is still consumed at lines 365 and 679, so the remaining import is live. The diff is exactly one deleted line and nothing else rides along. Verification done — emitting the review.

First-Principles-Verdict: PASS

Deletes the second of two identical Modal imports that turned every CI lane on main red; pure subtraction, nothing rides along.

What this change ships

Intent: make main (and every open PR) build again by removing a duplicate import that fails tsc. This is a FIX.

  1. Builds and typechecks on main succeed again — one duplicate import Modal line deleted — justified

The inventory is a single item and it is the fix. The zero option leaves TS2300 on the merge base failing five lanes on every PR — a reported, reproducible defect (error TS2300: Duplicate identifier 'Modal', verified: the file at HEAD has one import at line 2 and two live <Modal> consumers at lines 365 and 679). The fix is itself a deletion, sits at the cause (the duplicated declaration is the defect; there is no deeper decision to unwind within reach of a one-line unbreak), keeps the surviving original import in place, and adds no surface, no knob, and no new concept. Smallest honest version and shipped version are identical: −1 line.

[FIRST-PRINCIPLES-REVIEWED] aba11fa

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of aba11faf736f95a7892fc7775563cd70b513b573 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] aba11fa

False positive or not applicable? A repository writer can comment:
/ai-review override gpt aba11faf736f95a7892fc7775563cd70b513b573: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed aba11faf736f95a7892fc7775563cd70b513b573 — this comment is updated in place on each push.

Review details

Modal remains imported at line 2 and used at lines 365, 396, 679, 692. The removed line was a genuine duplicate import. The change is correct and introduces no defect. No candidates exist and I find nothing to add.

No findings.

[OPUS-REVIEWED] aba11fa

Verdict parsed from the review's SHA-scoped output markers for commit aba11faf736f95a7892fc7775563cd70b513b573.

False positive or not applicable? A repository writer can comment:
/ai-review override fable aba11faf736f95a7892fc7775563cd70b513b573: <one-sentence reason>

@iamwhatever

Copy link
Copy Markdown
Collaborator Author

Super quick test fix about duplicate imports. I will merge directly to unblock other PRs.

@iamwhatever

Copy link
Copy Markdown
Collaborator Author

Superseded by #6916, which landed the identical one-line fix on main as d7b7d65 while this was in review. Verified: origin/main now has exactly one components/Modal import in ChannelPage.tsx.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Aug 30, 2026
@bolichen97
bolichen97 deleted the fix/duplicate-modal-import branch September 6, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant