app: tsc --noEmit red on main — AppUpdateSurface named import from *.vue shim (+ foundingPage.test.ts:287) #1854

Closed
opened 2026-09-24 20:06:36 +00:00 by matou-build-agent · 3 comments

Found while landing #1834 (WKT-DEMO Drive A Task 6). On a clean origin/main checkout, cd app && pnpm exec tsc --noEmit -p tsconfig.json reports three errors (NOT introduced by #1834 — they reproduce with that work stashed):

src/bootstrap.ts(40,25): error TS2614: Module '"*.vue"' has no exported member 'AppUpdateSurface'. Did you mean to use 'import AppUpdateSurface from "*.vue"' instead?
tests/unit/appShell.test.ts(5,25): error TS2614: (same, AppUpdateSurface)
tests/unit/foundingPage.test.ts(287,16): error TS2349: This expression is not callable. Type 'never' has no call signatures.

The first two look introduced by the recent AppUpdateSurface work (#1850, e868c556): the component is imported by NAME from a *.vue module, but the app's *.vue type shim only exports a default. The foundingPage.test.ts:287 one is a separate never-callable.

Why it matters: several e2e drive tasks' acceptance gates state tsc --noEmit must be clean (e.g. WKT-DEMO Drive A/B Task 6/8 verification). A red baseline makes that gate ambiguous — a worker must diff against the stashed tree to prove their own files are clean. Worth fixing the shim import (or the component's export) so app typechecks green again.

Ruled a follow-up (not fixed inline) under ADR 0174 — outside #1834's scope (rule 1: work only the ticket, file follow-ups). No app-report origin.

Found while landing #1834 (WKT-DEMO Drive A Task 6). On a clean `origin/main` checkout, `cd app && pnpm exec tsc --noEmit -p tsconfig.json` reports three errors (NOT introduced by #1834 — they reproduce with that work stashed): ``` src/bootstrap.ts(40,25): error TS2614: Module '"*.vue"' has no exported member 'AppUpdateSurface'. Did you mean to use 'import AppUpdateSurface from "*.vue"' instead? tests/unit/appShell.test.ts(5,25): error TS2614: (same, AppUpdateSurface) tests/unit/foundingPage.test.ts(287,16): error TS2349: This expression is not callable. Type 'never' has no call signatures. ``` The first two look introduced by the recent `AppUpdateSurface` work (#1850, `e868c556`): the component is imported by NAME from a `*.vue` module, but the app's `*.vue` type shim only exports a default. The `foundingPage.test.ts:287` one is a separate `never`-callable. Why it matters: several e2e drive tasks' acceptance gates state `tsc --noEmit` must be clean (e.g. WKT-DEMO Drive A/B Task 6/8 verification). A red baseline makes that gate ambiguous — a worker must diff against the stashed tree to prove their own files are clean. Worth fixing the shim import (or the component's export) so `app` typechecks green again. Ruled a follow-up (not fixed inline) under ADR 0174 — outside #1834's scope (rule 1: work only the ticket, file follow-ups). No app-report origin.
Author
Member

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling: bug + ready-for-agent. Why a two-way door: a self-contained TypeScript fix, revertible by a later commit and proven by an existing probe — cd app && pnpm exec tsc --noEmit -p tsconfig.json goes from exit 2 → exit 0 while pnpm exec vue-tsc --noEmit -p tsconfig.json stays green (exit 0). Not on the one-way-door list. No app-report origin (build-agent-filed, body confirms), so no landing-pr. No UX flow/wireframe/seam referenced, so not needs-design.

Verified (reproduced on 0d332f92, clean main)

cd app && pnpm exec tsc --noEmit -p tsconfig.json → exit 2, exactly the three reported errors:

src/bootstrap.ts(40,25): error TS2614: Module '"*.vue"' has no exported member 'AppUpdateSurface'. Did you mean to use 'import AppUpdateSurface from "*.vue"' instead?
tests/unit/appShell.test.ts(5,25): error TS2614: (same, AppUpdateSurface)
tests/unit/foundingPage.test.ts(287,16): error TS2349: This expression is not callable. Type 'never' has no call signatures.

pnpm exec vue-tsc --noEmit -p tsconfig.json is green — the app's own build gate (package.json build: vue-tsc -p tsconfig.json) does not see these because vue-tsc understands .vue internals; plain tsc reads the generic *.vue shim in app/src/env.d.ts (default export only). This matters because several drive acceptance gates invoke plain tsc, not vue-tsc — e.g. docs/superpowers/plans/2026-09-24-wkt-founding-drive.md:113,308,896 and 2026-09-24-wkt-app-drive.md:765 all run cd app && pnpm exec tsc --noEmit -p tsconfig.json. A red baseline makes "typecheck clean" ambiguous for those tasks.

Root cause

  1. Errors 1 & 2 (AppUpdateSurface) — app/src/components/AppShell.vue:105 declares export interface AppUpdateSurface. app/src/bootstrap.ts:40 and app/tests/unit/appShell.test.ts:5 import it by name (import AppShell, { type AppUpdateSurface } from 'src/components/AppShell.vue'). The declare module '*.vue' shim (app/src/env.d.ts:7) exports only a default, so plain tsc sees no named member.
  2. Error 3 (foundingPage.test.ts:287) — journey.vm.openSection('identity', 1) calls a defineExposed method (FoundingJourney.vue:738) directly. Under the generic *.vue shim, journey.vm's method resolves to never. The sibling call at tests/unit/foundingPage.test.ts:105 already works around this: (wrapper.vm as unknown as { openSection: (l: string, i: number) => void }).openSection('data', 0).

The fix (suggested shape — the agent decides)

  1. Move the AppUpdateSurface interface out of AppShell.vue's <script> into a plain .ts module (e.g. a new app/src/components/appUpdateSurface.ts, or an existing app-side types module). Have AppShell.vue import it for its Props.update, and repoint bootstrap.ts:40 and appShell.test.ts:5 to import the type from that .ts module. (A generic *.vue shim cannot carry per-file named exports; extraction is the durable fix, not shim edits.)
  2. At foundingPage.test.ts:287, apply the same as unknown as { openSection: (l: string, i: number) => void } cast already used at line 105.

Acceptance / proof

  • cd app && pnpm exec tsc --noEmit -p tsconfig.json → exit 0 (clean).
  • cd app && pnpm exec vue-tsc --noEmit -p tsconfig.json → stays exit 0.
  • cd app && pnpm exec vitest run tests/unit/appShell.test.ts tests/unit/foundingPage.test.ts → green.
  • cd app && pnpm exec eslint clean on touched files.

Small, mechanical, type-only — a candidate for a model-sonnet label if the queue wants to right-size it (leaving the default in place is fine).

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** **Ruling:** `bug` + `ready-for-agent`. **Why a two-way door:** a self-contained TypeScript fix, revertible by a later commit and proven by an existing probe — `cd app && pnpm exec tsc --noEmit -p tsconfig.json` goes from exit 2 → exit 0 while `pnpm exec vue-tsc --noEmit -p tsconfig.json` stays green (exit 0). Not on the one-way-door list. No `app-report` origin (build-agent-filed, body confirms), so no `landing-pr`. No UX flow/wireframe/seam referenced, so not `needs-design`. ## Verified (reproduced on `0d332f92`, clean `main`) `cd app && pnpm exec tsc --noEmit -p tsconfig.json` → **exit 2**, exactly the three reported errors: ``` src/bootstrap.ts(40,25): error TS2614: Module '"*.vue"' has no exported member 'AppUpdateSurface'. Did you mean to use 'import AppUpdateSurface from "*.vue"' instead? tests/unit/appShell.test.ts(5,25): error TS2614: (same, AppUpdateSurface) tests/unit/foundingPage.test.ts(287,16): error TS2349: This expression is not callable. Type 'never' has no call signatures. ``` `pnpm exec vue-tsc --noEmit -p tsconfig.json` is **green** — the app's own build gate (`package.json` `build`: `vue-tsc -p tsconfig.json`) does not see these because `vue-tsc` understands `.vue` internals; plain `tsc` reads the generic `*.vue` shim in `app/src/env.d.ts` (default export only). This matters because several drive acceptance gates invoke **plain `tsc`**, not `vue-tsc` — e.g. `docs/superpowers/plans/2026-09-24-wkt-founding-drive.md:113,308,896` and `2026-09-24-wkt-app-drive.md:765` all run `cd app && pnpm exec tsc --noEmit -p tsconfig.json`. A red baseline makes "typecheck clean" ambiguous for those tasks. ## Root cause 1. **Errors 1 & 2 (`AppUpdateSurface`)** — `app/src/components/AppShell.vue:105` declares `export interface AppUpdateSurface`. `app/src/bootstrap.ts:40` and `app/tests/unit/appShell.test.ts:5` import it by name (`import AppShell, { type AppUpdateSurface } from 'src/components/AppShell.vue'`). The `declare module '*.vue'` shim (`app/src/env.d.ts:7`) exports only a default, so plain `tsc` sees no named member. 2. **Error 3 (`foundingPage.test.ts:287`)** — `journey.vm.openSection('identity', 1)` calls a `defineExpose`d method (`FoundingJourney.vue:738`) directly. Under the generic `*.vue` shim, `journey.vm`'s method resolves to `never`. The sibling call at `tests/unit/foundingPage.test.ts:105` already works around this: `(wrapper.vm as unknown as { openSection: (l: string, i: number) => void }).openSection('data', 0)`. ## The fix (suggested shape — the agent decides) 1. Move the `AppUpdateSurface` interface out of `AppShell.vue`'s `<script>` into a plain `.ts` module (e.g. a new `app/src/components/appUpdateSurface.ts`, or an existing app-side types module). Have `AppShell.vue` import it for its `Props.update`, and repoint `bootstrap.ts:40` and `appShell.test.ts:5` to import the type from that `.ts` module. (A generic `*.vue` shim cannot carry per-file named exports; extraction is the durable fix, not shim edits.) 2. At `foundingPage.test.ts:287`, apply the same `as unknown as { openSection: (l: string, i: number) => void }` cast already used at line 105. ## Acceptance / proof - `cd app && pnpm exec tsc --noEmit -p tsconfig.json` → exit 0 (clean). - `cd app && pnpm exec vue-tsc --noEmit -p tsconfig.json` → stays exit 0. - `cd app && pnpm exec vitest run tests/unit/appShell.test.ts tests/unit/foundingPage.test.ts` → green. - `cd app && pnpm exec eslint` clean on touched files. Small, mechanical, type-only — a candidate for a `model-sonnet` label if the queue wants to right-size it (leaving the default in place is fine).
Author
Member

swarm-claim host=bens-mac-04 run=32163
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=32163 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1854 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1854,
  "status": "success",
  "commits": [
    "9fdb5a5f88135f277688d83a175b8c66fe2a011e"
  ],
  "changed_files": [
    "STATUS.md",
    "app/src/bootstrap.ts",
    "app/src/components/AppShell.vue",
    "app/src/lib/appupdate.ts",
    "app/tests/unit/appShell.test.ts",
    "app/tests/unit/foundingPage.test.ts"
  ],
  "tests": [
    {
      "command": "cd app && CI=true pnpm exec tsc --noEmit -p tsconfig.json",
      "exit_code": 0
    },
    {
      "command": "cd app && CI=true pnpm exec eslint src/bootstrap.ts src/components/AppShell.vue src/lib/appupdate.ts tests/unit/appShell.test.ts tests/unit/foundingPage.test.ts",
      "exit_code": 0
    },
    {
      "command": "cd app && CI=true pnpm exec vitest run tests/unit/appShell.test.ts tests/unit/foundingPage.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "bootstrap.ts:40 AppUpdateSurface named .vue import resolved": "AppUpdateSurface moved to src/lib/appupdate.ts; bootstrap.ts now imports it from that .ts module (no named .vue type import) — commit 9fdb5a5f",
    "appShell.test.ts:5 AppUpdateSurface named .vue import resolved": "appShell.test.ts now imports AppUpdateSurface from src/lib/appupdate.ts — commit 9fdb5a5f",
    "foundingPage.test.ts:287 never-callable resolved": "journey.vm cast to { openSection } like line 105 — commit 9fdb5a5f",
    "app tsc --noEmit clean": "cd app && tsc --noEmit -p tsconfig.json exits 0"
  },
  "summary": "Restored app-wide tsc --noEmit to green by moving AppUpdateSurface off the .vue SFC into src/lib/appupdate.ts and casting the findComponent vm like its neighbour.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1854 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1854, "status": "success", "commits": [ "9fdb5a5f88135f277688d83a175b8c66fe2a011e" ], "changed_files": [ "STATUS.md", "app/src/bootstrap.ts", "app/src/components/AppShell.vue", "app/src/lib/appupdate.ts", "app/tests/unit/appShell.test.ts", "app/tests/unit/foundingPage.test.ts" ], "tests": [ { "command": "cd app && CI=true pnpm exec tsc --noEmit -p tsconfig.json", "exit_code": 0 }, { "command": "cd app && CI=true pnpm exec eslint src/bootstrap.ts src/components/AppShell.vue src/lib/appupdate.ts tests/unit/appShell.test.ts tests/unit/foundingPage.test.ts", "exit_code": 0 }, { "command": "cd app && CI=true pnpm exec vitest run tests/unit/appShell.test.ts tests/unit/foundingPage.test.ts", "exit_code": 0 } ], "criteria": { "bootstrap.ts:40 AppUpdateSurface named .vue import resolved": "AppUpdateSurface moved to src/lib/appupdate.ts; bootstrap.ts now imports it from that .ts module (no named .vue type import) — commit 9fdb5a5f", "appShell.test.ts:5 AppUpdateSurface named .vue import resolved": "appShell.test.ts now imports AppUpdateSurface from src/lib/appupdate.ts — commit 9fdb5a5f", "foundingPage.test.ts:287 never-callable resolved": "journey.vm cast to { openSection } like line 105 — commit 9fdb5a5f", "app tsc --noEmit clean": "cd app && tsc --noEmit -p tsconfig.json exits 0" }, "summary": "Restored app-wide tsc --noEmit to green by moving AppUpdateSurface off the .vue SFC into src/lib/appupdate.ts and casting the findComponent vm like its neighbour.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1854
No description provided.