Skip to content

fix(frontend): look up the console's schemas without type arguments - #163

Merged
Upd4ting merged 1 commit into
mainfrom
fix/frontend-schema-get
Nov 13, 2026
Merged

Upd4ting merged 1 commit into
mainfrom
fix/frontend-schema-get

Conversation

@Upd4ting

Copy link
Copy Markdown
Member

Why

interface-database 0.4.0 was published on 2026-11-13. It drops Schema.get's type arguments and types a looked-up schema's definition as unknown (ANT-2383). The frontend CI job builds this layer in a fresh Inertia app, which now installs 0.4.0, so it fails on main and on every open branch. The failure is in frontend-vue/app/build/composables/useQueryRuntime.ts, which called Schema.get<unknown, SchemaDefLike>. This PR makes the layer compile on 0.3 and 0.4 alike, so the open PRs can go green before the module's full 0.4.0 move lands.

What changed

  • frontend-vue/app/build/composables/useQueryRuntime.ts. The console's schema map is typed Schema<unknown, unknown> and is filled with Schema.get(summary.id), without type arguments. Nothing reads a binding's definition: the map is only handed to the user's query code. A new Schema(id, definition) built for a schema the registry lacks fits the same type. Type arguments are erased, so the emitted JavaScript is the same.

Attention

Proof

pnpm test:frontend is the frontend CI job: it builds and type-checks the layer in a generated Inertia app, which installs interface-database 0.4.0.

Before (origin/main):

✖ Type check failed · 2 errors 45.7s
✖ 2 type errors
  ./frontend-vue/app/build/composables/useQueryRuntime.ts:68:3  TS2322
  ./frontend-vue/app/build/composables/useQueryRuntime.ts:69:15  TS2558

After (this branch):

✔ Type check passed 1m 14s
Verified 2 modules · 1m 33s

pnpm test:layer on the layer's own lockfile, which still resolves interface-database 0.3.1:

 Test Files  19 passed (19)
      Tests  166 passed (166)

pnpm run checks on the committed head:

Checks: 12 passed, 0 failed.

API: comparison incomplete due to execution errors.
API: skipped .agents/skills/verify-dms-database, no exports, main or types.
API: skipped frontend-vue, private.
Execution error: playground (playground): /home/debian/.tmp/antelope-proof-vU7Y8y/worktrees/base/playground: published target dist/index.d.ts has no emitted declaration.
Execution error: playground (playground): /home/debian/.tmp/antelope-proof-vU7Y8y/worktrees/head/playground: published target dist/index.d.ts has no emitted declaration.
Runtime API: 2 packages, 3 entries unchanged against origin/main (committed HEAD).
Auto-imports: 1 packages, 0 entries unchanged against origin/main (committed HEAD).
No behavioural probe ran.

Suppressions in authored code files (origin/main and committed HEAD). A lint directive counts once per rule it names; * is a directive naming none.

Suppressions base HEAD
Lint suppressions, all rules 4 4
Lint suppressions, anti-slop/no-unknown-parameters 4 4
@ts-expect-error 0 0
@ts-ignore 0 0
SAFETY: comments 0 0
Lint config rule-offs, all rules 0 0

interface-database 0.4.0 drops Schema.get's type arguments and types a
looked-up definition as unknown. The query runtime typed its map with
Schema.get<unknown, SchemaDefLike>, so the layer failed its type check
once the frontend build installed 0.4.0. The map now holds
Schema<unknown, unknown>, which both 0.3 and 0.4 satisfy.
@Upd4ting
Upd4ting merged commit a1f41e4 into main Nov 13, 2026
11 checks passed
@Upd4ting
Upd4ting deleted the fix/frontend-schema-get branch November 13, 2026 13:07
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