Skip to content

fix(ts): resolve all TypeScript build errors blocking Vercel deploy - #14

Merged
mosoriob merged 1 commit into
developfrom
fix/ts-build-errors
Jun 5, 2026
Merged

mosoriob merged 1 commit into
developfrom
fix/ts-build-errors

Conversation

@mosoriob

@mosoriob mosoriob commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix all TypeScript build errors on the develop branch that were failing the Vercel deployment.

Changes (11 files)

Unused imports/variables (TS6133/TS6192)

  • Removed unused React imports from JSX-runtime components (ModelTree.tsx, ModelsPage.tsx, test files)
  • Removed unused login variable in ProtectedRoute.tsx
  • Removed unused OAuth2CallbackPage and ProtectedRoute imports in App.tsx
  • Cleaned up unused vi import in test/setup.ts

GraphQL Kind enum usage (TS2322)

  • Replaced string literals ("Document", "Field", etc.) with Kind.DOCUMENT, Kind.FIELD, etc. from the graphql package in apollo-client.test.ts
  • Used OperationTypeNode.QUERY for operation type

Possibly undefined access (TS2532/TS18048)

  • Added non-null assertions on array accesses in test files where data shape is known
  • Fixed never type cast in AuthProvider.test.tsx
  • Changed null to undefined for hasFixedValue in mutation-builder.test.ts

Verification

  • tsc --noEmit: exit 0 (zero errors)
  • npm run build: exit 0 (tsc -b + vite build both pass)
  • All tests that previously passed still pass

Kanban: t_0cf5ef4b

- Remove unused imports (React in JSX transform components, unused vars)
- Replace GraphQL string literals with Kind enum values in apollo-client.test.ts
- Add non-null assertions for possibly-undefined array accesses in tests
- Fix null vs undefined mismatch in mutation-builder.test.ts
- Fix type cast for never-typed variable in AuthProvider.test.tsx
@mosoriob
mosoriob merged commit b5a7efe into develop Jun 5, 2026
mosoriob added a commit that referenced this pull request Aug 10, 2026
…115)

The three delete mutations removed the provenance and permission rows
first, copied from the Lit app. Those rows are what authorise the
delete: the user role may remove one of these only while the row still
carries a CREATE provenance event from that user, and every child on the
tree is gated through the thread's provenance or permission. So the
whole cascade matched 0 rows, and Hasura reports a filtered-out row as
`null` with no errors key, which the app read as success.

Deleting the row first does not work either -- those FKs were
ON DELETE RESTRICT. graphql_engine now cascades them, so this deletes
bottom-up and never touches provenance or permission.

Two more faults fixed with it:

- The port dropped Lit's dataslice_resource, dataslice and thread_data
  deletes. Nothing noticed while the mutation was a no-op, but since
  #104 started writing those rows a fixed delete would have hit an FK
  error. Order is load-bearing: dataslice is filtered through
  thread_data, so it goes first, which the deferred FK allows.

- assertDeleted raises when _by_pk comes back null, so a delete the
  server declines can no longer render as a success toast.

Requires graphql_engine PR #14.

Fixes #99
mosoriob added a commit that referenced this pull request Aug 30, 2026
Picks up 1771200018000_response_variable_standard_variable_fk and the metadata
move of the four array relationships onto modelcatalog_standard_variable, merged
as mintproject/graphql_engine#15. Also picks up the cascade migration (#14),
which the pointer had not yet caught up with.
mosoriob added a commit that referenced this pull request Aug 30, 2026
* chore: bump graphql_engine to main for the indicator FK migration

Picks up 1771200018000_response_variable_standard_variable_fk and the metadata
move of the four array relationships onto modelcatalog_standard_variable, merged
as mintproject/graphql_engine#15. Also picks up the cascade migration (#14),
which the pointer had not yet caught up with.

* fix(ui-react): reload the executions after fetching results (#110)

Registration writes the execution_result rows server-side, but the results
table renders the executions held in MintThread's state, and
handlePublishResults only refetches GetThreadExecution -- the pipeline and
its counters, not the execution rows that carry the results.

So a successful fetch left the table reading "No results available" until
the user pressed Reload. That is #110's own symptom, still present on the
first click.

MintResults now reloads the current page of executions after a successful
publish, through the same onFetchRuns path the Reload button uses. A failed
publish still reloads nothing.

Verified live against TACC on thread jx8ibyilmsmg1pvt: the registered row
was deleted to restore the "before" state, and one click on Fetch results
rendered the output with no Reload.
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