Commit 619b59a
authored
fix: resolve all frontend type errors and enforce strict type checking (eneo-ai#291)
* fix: resolve type errors in model admin dialogs and make svelte-check blocking in CI
- Fix Input.Text bind:value type mismatch (number|undefined → string) in AddCompletionModelDialog
- Remove unnecessary typeof checks on store values in Embedding/Transcription dialogs
- Resolve merge conflicts using shared modelProviderCapabilities module
- Fix m.provider_no_support_title() to pass both required params
- Refactor +page.ts Promise.all to preserve individual types
- Make svelte-check and eslint blocking in pr_lint.yml CI workflow
* fix: resolve all 448 frontend type errors for strict svelte-check
Button variants:
- Replace "ghost" with "simple" and "secondary" with "outlined" across 13 files
intric-js SDK types:
- Fix path parameters ({id} → {provider_id}, {model_id}, {template_id}, etc.)
- Fix HTTP method mismatches and response type assertions
- Add proper JSDoc types for endpoints not yet in OpenAPI schema
Component type fixes:
- Add renderComponent() bridge for Svelte 5/4 table component compat
- Export components type from @intric/intric-js index.d.ts
- Type MCP tool interfaces properly (MCPTool, SelectableMCPServer)
- Fix template category Record indexing and implicit any types
- Fix RetentionPolicyInput to use non-null local binding
- Convert CreateNew.svelte from slot syntax to Snippet pattern
- Use spread syntax for props not in component type definitions
Misc fixes:
- Fix Input.Text bind:value number/string mismatches
- Add proper null checks and type narrowing throughout
- Fix role comparison, SvelteKit error() calls, import paths
- Widen ModelWithProvider type to include optional properties
* fix: replace explicit any types with proper types and fix lint warnings
- Replace providerData: any with typed object literals
- Replace catch (e: any) with catch (e: unknown) + instanceof checks
- Change $: to const for static arrays (providerTypes, modelFamilies, etc.)
- Type MCP components: intricClient: Intric, model parameters, MCPServer props
- Use CapabilityModel type instead of any in model suggestions
- Fix quoted attribute warning in MCPServersTable
- Add index signature to MCPServer for schema compatibility
* fix: clean up lint errors and add frontend pre-commit hook
- Remove unused formatTokenLimit function from AddCompletionModelDialog
- Remove unused let:close slot bindings from dialog controls
- Add (key) to all #each blocks in model admin dialogs
- Replace remaining any types with specific types
- Fix Prettier formatting in intric-js endpoints and UI table
- Add frontend-lint pre-commit hook for Svelte/TS/JS files
* fix: resolve svelte-check CI failures for paraglide and DateRange type error
- Add i18n:compile step to web check script so paraglide messages are
generated before svelte-check runs
- Fix DateValue narrowing loss in DateRange.svelte by capturing start
in a local variable before reassignment
- Keep lint step non-blocking (continue-on-error) due to pre-existing
prettier formatting issues across the codebase
* fix: resolve all frontend eslint errors and enforce prettier formatting
- Fix all 219 ESLint errors across @intric/web and @intric/ui
- Replace explicit `any` types with proper types where possible
- Remove unused imports and variables
- Add keys to {#each} blocks (svelte/require-each-key)
- Add descriptions to @ts-expect-error directives
- Fix infinite reactive loop warnings with eslint-disable
- Convert immutable reactive statements to const declarations
- Run prettier --write across entire frontend codebase
- Add src/lib/paraglide/ to .prettierignore and eslint ignores
(auto-generated files should not be checked)
- Make both svelte-check and lint fully blocking in CI
* chore: add underscore prefix convention to eslint no-unused-vars config
- Add argsIgnorePattern and varsIgnorePattern for ^_ prefix to both
@intric/web and @intric/ui eslint configs
- Remove 9 now-unnecessary eslint-disable comments that were only
needed because the _ prefix wasn't configured
* fix: add missing eslint dependencies to all frontend packages
- Add @eslint/js to intric-js, ui, and web packages
- Add typescript-eslint to ui package
- These were imported in eslint configs but relied on hoisting,
which fails in CI where node_modules layout differs
* fix: add remaining missing eslint dependencies for CI
- Add eslint-config-prettier to @intric/web (imported but not declared)
- Add eslint-plugin-react-hooks to docs-site (required by eslint-config-next)
* fix: scope CI lint to @intric/* packages only
docs-site uses eslint-config-next which has transient peer deps
that aren't resolved correctly with bun's strict module layout in CI.
Since docs-site was never lint-checked in CI before, exclude it from
the blocking lint step rather than chasing transient deps.
* fix: resolve frontend type errors after openapi-typescript v7 upgrade
- Tighten IntricParams helper so endpoints without real path/query/header/cookie
properties are typed as `params?: never`, fixing the missing-params errors
introduced by the openapi-typescript v6 → v7 upgrade.
- Switch api-keys.js JSDoc returns to schema-derived types instead of duplicated
literal shapes that drifted from the generated schema.
- Replace ad-hoc `error?.getReadableMessage?.()` patterns with the typed
getErrorMessage() helper that narrows IntricError properly.
- Extend the local Tenant type with id (backend exposes it but the TenantPublic
schema omits it) and cast users.tenant() through unknown.
- Fix slot misuse in admin api-keys page, replace unsupported "ghost" Button
variant with "simple", and split the assistants stream call into two paths so
TS can narrow the union endpoint correctly.
- Resolve scattered LocalizedString / string-undefined / wizard_config issues
in admin and dashboard pages without introducing any casts.
- Add SvelteSet/SvelteURLSearchParams + each-block keys + eslint-disable scopes
for the dynamic-URL navigation cases the lint rule cannot statically prove.
* fix: restore notification policy fields and audit log query param
Fix three regressions from the previous type-error sweep:
- updateAdminNotificationPolicy() rebuilt the request payload with only
three fields, silently dropping allow_auto_follow_published_assistants
and allow_auto_follow_published_apps. The proper fix is in api-keys.js:
switch the JSDoc to ApiKeyNotificationPolicyUpdate (and the user variant
ApiKeyNotificationPreferencesUpdate) so the schema-derived type, which
already permits all fields and `null`, drives the contract. The helper
now forwards the full updates object unchanged.
- The same payload rebuild also coerced max_days_before_expiry: null to
undefined. Schema allows `number | null`, where null is the explicit
"remove the cap" signal — restoring null pass-through fixes that.
- The "open audit config" link lost its ?tab=config query when migrated
to resolve(). Pass the full route+query string literal to resolve()
(matching the existing pattern in account/integrations) so the link
lands on the config tab again.
* chore: apply prettier formatting and fix lint issues in api-keys feature
Run prettier --write across the workspace to bring it back into compliance
with the formatting CI gate. Most touched files come from PR eneo-ai#206
(api-keys-v2) and PR eneo-ai#324 (shadcn-svelte introduction) which were merged
without being prettier-formatted.
Also fix lint issues in api-keys feature files:
- NotificationPreferences.svelte: replace 4× `catch (error: any)` with
unknown + getErrorMessage helper, swap Set → SvelteSet for reactivity
- ExpirationPicker.svelte: rename Infinity icon import to avoid global
shadowing, swap Date → SvelteDate (4×), add each-block key
- CreateApiKeyDialog.svelte: swap Map → SvelteMap, add 11 each-block keys,
scope eslint-disable for trusted localized {@html} usage, drop a useless
literal mustache
- OverviewTile.svelte / ExpiringKeysNotification.svelte: scope
eslint-disable for href prop / localizeHref navigation cases
* fix: resolve all frontend eslint errors
Clear the remaining 82 lint errors that were failing CI on both
apps/web and packages/ui. Categories:
- svelte/prefer-svelte-reactivity: swap Set → SvelteSet, Map → SvelteMap,
URLSearchParams → SvelteURLSearchParams, Date → SvelteDate where the
instances are held as component state. Drop $state() wrappers around
these since they are already reactive.
- svelte/no-navigation-without-resolve: wrap static literal routes in
resolve() where possible. For dynamic URLs built from template strings,
window.location, or props, add eslint-disable scopes with explanatory
comments matching the strategy (dynamic URL, localizeHref handles
routing, server endpoint, typed href prop, external URL from
markdown/metadata/message reference).
- svelte/require-each-key: add stable keys to every {#each} block
(using a unique id, the literal itself for primitive lists, or the
iteration index for fixed skeleton loops).
- svelte/no-at-html-tags: add scoped eslint-disable with comments
explaining that the content is trusted localized i18n.
- @typescript-eslint/no-explicit-any: replace catch (error: any) with
unknown + getErrorMessage() helper in NotificationPreferences.svelte.
Also: rename Infinity icon import in ExpirationPicker to avoid shadowing
the global Infinity, and restructure pushState() call sites in spaces
chat page so the eslint-disable directive targets the correct line.
* chore: enforce prettier and ruff format in pre-commit hooks
Add auto-formatting hooks so code is reformatted (and re-staged) on
every commit, preventing the kind of CI formatting-failure churn we've
been cleaning up:
- ruff-format runs on changed Python files in backend/ (Python equivalent
of prettier). Excludes backend/alembic/ since migrations are historical
artifacts that shouldn't change after being deployed — whitespace churn
breaks git blame / bisect on schema history.
- frontend-format runs prettier --write on changed Svelte/TS/JS/CSS/JSON/
MD/YAML files in frontend/apps/* and frontend/packages/*. Covers the
full workspace (not just apps/web), excludes .svelte-kit / build / dist
generated output.
Both hooks auto-stage their changes, so developers don't need to run
bun run format / ruff format manually — the hook handles it. bun run
format (root-level) is still available for a full workspace reformat.
* chore: apply ruff format to backend (excluding alembic migrations)
Run ruff format across the backend codebase so it matches the new
pre-commit auto-format hook. Result is pure whitespace / line break /
trailing comma reformatting — ruff format is a deterministic,
semantic-preserving formatter (Python equivalent of black).
Alembic migrations (backend/alembic/) are intentionally excluded:
they are historical artifacts that should not change after being
deployed, and whitespace churn breaks git blame / bisect on schema
history. New migrations going forward will still be formatted by the
pre-commit hook (which uses the same exclude).
No logic changes. 427 files touched, all behavior preserved. Run the
test suite after pulling this to verify nothing regresses — ruff format
is expected to be safe, but very rare edge cases (docstring whitespace
asserted in tests, multi-line string concatenation) could in theory
surface.
* fix: declare missing @eslint/js dep in @intric/ui and ignore generated inlang files
Fixes CI lint failures: @intric/ui's eslint.config.js imports @eslint/js
which was only resolvable via the hoisted root node_modules locally,
breaking the GitHub Actions runner. Also exclude project.inlang/.meta.json
and cache from prettier since they are auto-generated and gitignored.1 parent b4b719d commit 619b59a
File tree
489 files changed
+16383
-10542
lines changed- .github/workflows
- backend
- scripts
- tests
- integration
- audit
- completion_models
- credentials
- fixtures
- migrations
- repositories
- services
- sysadmin
- unittests
- actors
- admin
- ai_models
- analysis.py
- apps/api
- assistants
- authentication
- crawler
- files
- icons
- integration
- application
- domain/factories
- infrastructure
- mappers
- services
- security_classifications
- settings
- spaces
- api
- sysadmin
- templates
- tenants
- users
- worker
- feeder
- unit
- validation
- frontend
- apps
- docs-site
- web
- project.inlang
- src
- lib
- api
- assets
- components
- layout
- LoadingScreen
- Page
- settings
- toast
- ui/card
- core
- editing
- errors
- features
- ai-models
- components
- api-keys
- apps/components
- assistants
- attachments/components
- auth
- chat
- components
- conversation
- switcher
- credentials/components
- icons
- insights
- components
- integrations
- components
- import
- jobs
- components
- knowledge
- components
- mcp/components
- publishing/components
- security-classifications/components
- spaces
- components
- templates
- components
- admin
- apps
- assistants
- gallery
- wizard
- tokens
- routes
- (app)
- account
- api-keys
- integrations
- admin
- api-keys
- audit-logs
- export
- [job_id]
- cancel
- download
- status
- async
- insights
- assistant/[assistantId]
- integrations
- legacy/user-groups
- mcp-servers
- models
- AddWizard
- components
- templates
- edit
- app/[id]
- assistant/[id]
- new
- app
- assistant
- usage
- tokens
- users
- [userId]
- users
- editor
- dashboard
- [assistantId]/[[sessionId]]
- app/[appId]
- results/[resultId]
- spaces
- [spaceId]
- apps
- [appId]
- edit
- results
- [resultId]
- run
- assistants
- [assistantId]/edit
- chat
- insights
- group-chats/[groupChatId]/edit
- knowledge
- collections
- [collectionId]
- integrations
- wrapper/[wrapperId]
- websites
- [id]
- members
- overview
- services
- settings
- list
- (public)
- deactivated
- invite/[organisationId]
- login
- switch-organisation
- logout
- auth/callback
- integrations/callback/token
- packages
- eslint-plugin
- rules
- intric-js
- src
- client
- endpoints
- types
- ui
- src
- icons/svg
- lib
- Input
- Markdown/renderers
- Table
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
489 files changed
+16383
-10542
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | | - | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
36 | 61 | | |
37 | 62 | | |
38 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | | - | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | | - | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
70 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
| |||
140 | 150 | | |
141 | 151 | | |
142 | 152 | | |
143 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
144 | 161 | | |
145 | 162 | | |
146 | 163 | | |
| |||
165 | 182 | | |
166 | 183 | | |
167 | 184 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
174 | 195 | | |
175 | 196 | | |
176 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
54 | | - | |
55 | 52 | | |
56 | 53 | | |
57 | 54 | | |
| |||
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
65 | | - | |
| 62 | + | |
66 | 63 | | |
67 | 64 | | |
68 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
0 commit comments