Skip to content

fix(frontend): strict vue-tsc — 231 → 0 type errors + 11 real runtime bugs (#9724) - #10073

Merged
mrveiss merged 3 commits into
Dev_new_guifrom
issue-9724
Jun 13, 2026
Merged

mrveiss merged 3 commits into
Dev_new_guifrom
issue-9724

Conversation

@mrveiss

@mrveiss mrveiss commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Thinking Path

Strict vue-tsc (type-check step of the Unit & Integration Tests job) was red on Dev_new_gui with 231 errors — the vue-tsc-baseline check passes only because it diffs an allowlist. Strict mode surfaced real defects (empty-SVG icons, missing store actions, dropped session ids). Fixed all type errors properly (no as any, no ts-ignore, no tsconfig relaxation) and the runtime bugs they exposed.

What Changed

  • Icon system (~118 errors): registered every icon name components already referenced in Icon.vue's ICONS map; typed all dynamic <Icon :name> sources as IconName; converted FA-class-returning helpers to IconName equivalents (useKnowledgeIcons, useConversationFiles, useDocumentChanges, iconMappings, etc.)
  • Duplicate-type unification: LLC WorkItem (4 drifting copies) → canonical src/views/llc/workItemTypes.ts; removed duplicate WorkflowStepStatus; aligned FileItem/TreeItem/CategoryOption; widened canonical ChatMessage
  • qrcode: typed shim added (src/types/qrcode.d.ts) — see discovery issue for the missing dependency

Real bugs fixed (type errors that were live defects)

  1. ~25 components passed FA class strings / FA-only names to the SVG <Icon> → rendered empty SVGs
  2. CommandPalette.startAgent() called non-existent chatStore.setCurrentAgentType() → guaranteed TypeError; wired the action in
  3. useChatApi.sendMessage passed {sessionId} not in ChatMessageOptions → session id silently dropped
  4. DesktopInterface: catch-param shadowed the error ref (init error never shown) + unreachable window.open
  5. ChatController.loadChatSessions: imported sessions had createdAt/updatedAt/isActive undefined
  6. ChatInterface @denied handler typed for string but receives {command, reason}
  7. PatternAnalysis crash (.toLowerCase() on undefined) on partial-stream rows
  8. KnowledgeContentViewer passed a TreeNode where a filename was expected
  9. SSHTerminal heartbeat start() missing required taskId arg
  10. canvas/index.ts exported a wrong ChartCell path
  11. qrcode imported but absent from package.json (device pairing) — shimmed + discovery issue filed

Verification

npx vue-tsc --noEmit -p tsconfig.app.json → exit 0, 0 errors (was 231), re-verified after rebasing onto current Dev_new_gui (resolved one WorkItem-unification conflict, preserving linked_pr_urls). eslint on all 137 touched files → 0 errors.

Model Used

Claude Fable 5 (frontend-engineer agent) + Opus 4.8 (main session: rebase conflict resolution, re-verification)

Closes #9724. Part of umbrella #9924.

mrveiss and others added 3 commits June 13, 2026 20:07
…y icons (#9724)

Adds the icon names components already referenced (help-circle, pencil, x,
thumbtack, folder-plus, comment-dots, volume-mute, microphone-slash,
smartphone, mobile-alt, hourglass-half/end, bell-slash, fire, power-off,
reply, scroll, graduation-cap, brackets-curly, music, file-* variants,
square, i-cursor, window-maximize, flag) — these previously rendered as
empty SVGs at runtime.

Types all dynamic <Icon :name> sources as IconName and converts the
FA-class-returning helpers (useKnowledgeIcons, useConversationFiles,
useDocumentChanges, useKnowledgeCategories.getCategoryIcon, iconMappings
consumers) to IconName-returning equivalents; adds asIconName() runtime
validator for backend-provided icon names.

Real rendering bugs fixed: FA class strings passed to <Icon> ('fas
fa-spinner fa-spin', 'fas fa-file-*'), FA-only names (apple, android,
user-friends, building, ticket-alt, certificate, aws, github, slack,
hand-pointer, arrows-alt-v, icons), CodeCell FA tuple, and
KnowledgeContentViewer passing a TreeNode object where a filename was
expected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ble type fixes (#9724)

- Canonical ChatMessage: widen metadata index to unknown (structured
  payloads are stored there), add backend message_id/role fields
- Unify LLC WorkItem into views/llc/workItemTypes.ts (4 drifting copies);
  Goal.level/owner + CompanyNode.agent_count optional per actual API rows
- workflowTemplates: drop duplicate WorkflowStepStatus (keep generated)
- BaseModal consumers (McpPromptPicker, McpResourceBrowser): correct
  modelValue/title API; WS onMessage handlers accept unknown with a
  string guard; window.setInterval for number-typed handles
- api-contract: ClearAllResponse/KnowledgeHealthResponse schema renames
- qrcode type shim (dependency itself still missing from package.json)
- apexcharts series/formatter/event types now module imports

Real bugs fixed:
- CommandPalette startAgent called chatStore.setCurrentAgentType which
  did not exist (runtime TypeError) — wired into useChatStore
- useChatApi.sendMessage dropped the session id (ChatMessageOptions has
  no sessionId field) — mapped to chatId
- DesktopInterface: catch param shadowed the error ref (error dialog
  never updated); error message interpolated the ref instead of the
  caught error; window.open referenced from template scope
- ChatController.loadChatSessions pushed raw repository sessions into
  the store (createdAt/updatedAt/isActive undefined)
- ChatInterface @denied handler typed for a string but receives a
  {command, reason} payload
- SSHTerminal heartbeat start() missing required taskId argument

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- KnowledgeGraphView 4th tab literal; KnowledgeBrowser CategoryOption
  aligned with KnowledgeBrowserHeader (IconName)
- WorkflowCanvas: 'loop' node label entry + typed switch-cases v-for
- useContextOverflowProtection: summary message satisfies canonical
  ChatMessage (id + sender)
- useWorkflowBuilder: shared WorkflowTemplateStep type for template
  steps and createWorkflow()
- usePatternAnalysis: normalize streamed GenericPattern partial rows to
  RefactoringSuggestion — PatternAnalysis.vue crashed on a missing
  estimated_effort during partial-result streaming (real bug)

Verification: npx vue-tsc --noEmit -p tsconfig.app.json -> exit 0;
eslint on all 137 touched files -> 0 errors; vitest iconMappings,
artifact-cells, stores -> 60/60 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

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