fix(layer): type-check clean inside a strict Nuxt 4 consumer: relative imports, indexed access, and three real bugs (stacked on #72) #73
No reviewers
Labels
No labels
idea
points
1
points
13
points
2
points
3
points
5
points
8
priority
p0
priority
p1
priority
p2
priority
p3
state
blocked
state
done
state
in-progress
state
ready
state
review
state
triage
status
declined
status
in-progress
status
planned
status
proposed
status
shipped
status
under-review
type
bug
type
epic
type
feature
type
spike
type
story
type
task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
tti/tti-ux!73
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/consumer-strict-types"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on #72. Its base is #72's branch, so the diff here is this one commit. Once #72 merges, retarget this PR to
main(Forgejo may do it automatically if #72's branch is deleted).Why
A consumer that
extendsthe layer type-checks the layer's source under its own tsconfig. Landscape vendors a 3.1.0 tarball built from5babb1e. Under Nuxt 4 defaults (strict,noUncheckedIndexedAccess) it finds 145 errors in the layer's files, and its CI filters them out as a stopgap until a clean 3.1.1 is vendored. With this commit it finds none. This is the fix intended for 3.1.1.What changes
~/imports become relative (17 imports in 11 files). In layer components and utils,~/resolves against the consumer's srcDir, so~/composables/useTuxVisionPrefs,~/utils/tuxEChartsThemeand~/assets/geo/*pointed into the consumer. Demo pages keep~/because consumers never compile them.@types/sanitize-htmlmoves todependencies. The layer'srender.tsimportssanitize-html, and a consumer installs only dependencies.at(i);?? "";hoveredSectioncomputed;Real bugs the types surfaced (runtime behaviour changes)
desk/render.ts: a disallowed<video>returnedattribs: "span"(a string). It now becomes an empty<span>, as a disallowed<img>already does.TuxDeskInspector: the column picker'smouseenterwrote.valueonto an injected ref the template had already unwrapped, so the canvas grid highlight never updated. The write now happens in a script function.badgeToneallowed"ok", whichTuxBadgedoesn't accept, so it rendered unstyled. The preset type now says"success". No preset used"ok". The command palette's own"ok"class tone is unchanged.Type gaps only (no runtime change)
TuxChartDonutarcs carrypatternKind, but theArctype didn't declare it.TuxReactiveSidebar's search-filter type predicate couldn't hold, sofilteredSectionskept| nullin its type.Provenance
This is commit 7e467c0 (built on
5babb1e, saved as a bundle in Landscape's.git/backups), rebased onto #72's merge. It applied without conflict, the diff content is identical, andapp/,server/andnuxt.config.tsare byte-identical to 7e467c0. So Landscape's 145 → 0 result carries over unchanged.Checks (local, Node 26.0.0)
7a1db31)379d1ac)--package-lock-onlynpm ci, npm 11.12.1 and 12.0.2npx eslint .npx vue-tsc --noEmitapp/pages/**andapp/app.vue; none are in components, composables or utils.npx vitest run.security-ignoreappliedAfter 3.1.1
Landscape re-vendors
frontend/vendor/tti-tti-ux-3.1.1.tgzand drops the temporary vue-tsc filter in.forgejo/workflows/ci-frontend.yml. That's a separate change in the Landscape repo.AI review · advisory
The AI panel couldn't review this change right now (it will review the next push). Details for admins: panel HTTP 401: {"error": {"message": "missing Forgejo credential", "type": "auth", "code": 401}}
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.