Skip to content

fix(web): ApiClientError undefined crash + type errors + frontend CI#275

Merged
ajianaz merged 1 commit into
developfrom
fix/frontend-type-errors-and-api-client-crash
Jun 30, 2026
Merged

fix(web): ApiClientError undefined crash + type errors + frontend CI#275
ajianaz merged 1 commit into
developfrom
fix/frontend-type-errors-and-api-client-crash

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

P1 — Login crash fix

  • ApiClientError is not defined: The ApiClientError class was accidentally deleted during v0.2.0 merge. It was used 9× in api.ts (inside ApiClient.request() and all standalone API functions). Restored the class definition before ApiClient class so it's available at runtime.

P1 — Remove dead route

  • Deleted web/src/routes/(dashboard)/issues/[id]/+page.svelte — this route was superseded by [issueId]/events/[eventId]. The old route referenced event.platform and event.message which don't exist on the StoredEvent type (backend proto has data: serde_json::Value only).

P2 — Type fixes

  • debounceTimer: Changed from null to undefined (matches clearTimeout signature — no more TS error)
  • vitest config: Extracted from vite.config.ts to dedicated vitest.config.ts with proper SvelteKit alias resolution (, , ``)

P3 — CI hardening

  • Added npm run check (svelte-check) and npm test (vitest) to web-build CI job
  • Prevents broken frontend code from merging without type-check or test coverage

Verification

  • svelte-check: 0 errors
  • vitest: 5/5 tests pass
  • vite build: success

- P1: Add missing ApiClientError class definition (was accidentally
  deleted during v0.2.0 merge — caused login crash with 'ApiClientError
  is not defined' runtime error)
- P1: Remove dead [id] issue route (superseded by [issueId]/events/[eventId]
  which correctly accesses event data via data.message)
- P2: Fix debounceTimer null check — use undefined instead of null to
  match clearTimeout signature
- P2: Extract vitest config from vite.config.ts to vitest.config.ts
  with proper SvelteKit alias resolution
- P3: Add svelte-check and vitest to web-build CI pipeline
@ajianaz ajianaz merged commit daed3bc into develop Jun 30, 2026
12 checks passed
@ajianaz ajianaz deleted the fix/frontend-type-errors-and-api-client-crash branch June 30, 2026 11:37
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