Skip to content

chore(tsconfig): drop baseUrl so app/tsconfig survives TypeScript 7 - #6057

Merged
senamakel merged 2 commits into
tinyhumansai:mainfrom
ntdatt812:chore/tsconfig-baseurl
Sep 12, 2026
Merged

senamakel merged 2 commits into
tinyhumansai:mainfrom
ntdatt812:chore/tsconfig-baseurl

Conversation

@ntdatt812

@ntdatt812 ntdatt812 commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

TypeScript 6 reports this as an error:

Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0.
  Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.

app/ pins typescript@5.8.3, so the current typecheck is quiet. An editor running a newer TypeScript flags it now, and it becomes a hard failure the moment the pin moves to 7.

Why removing it rather than silencing it

baseUrl here only anchors paths, and paths has not needed it since TypeScript 4.4 — entries resolve relative to the tsconfig that declares them. Two of the three entries gain a ./ prefix; tauri-plugin-ptt-api was already relative.

"ignoreDeprecations": "6.0" would also quiet it, but it buys one major version and has to be revisited. This makes the config correct instead.

Why it is safe

baseUrl has a second effect — it lets bare specifiers resolve against the base directory — so removing it can break imports that quietly relied on that. Checked: there are no from "src/…"-style imports under app/src.

vite.config.ts declares the alias itself:

resolve: { alias: { "@": resolve(__dirname, "src"), … } }

so the build never reads this setting; the change is type-level only.

Verification

tsc --noEmit -p app/tsconfig.json gives byte-identical output before and after — 7 errors either way, all from packages/tauri-plugin-ptt/guest-js, which resolves its own dependencies outside app/ and is unrelated to this change. No Cannot find module '@/…' appears in either run, with 33 files under app/src importing through the alias — a broken alias could not have been silent.

Re-checked the same config under TypeScript 6.0.3: the deprecation is gone, and no new diagnostic replaces it.

app/tsconfig.node.json has no baseUrl, so it needed no change.

Summary by CodeRabbit

  • Chores
    • Updated TypeScript path alias configuration to use relative source paths.
    • Removed the project-wide base URL setting while preserving existing plugin alias resolution.

TypeScript 6 reports it as an error:

  Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0.
  Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.

app/ pins typescript 5.8.3, so the current typecheck is quiet, but an
editor running a newer TypeScript flags it, and it becomes a hard failure
whenever the pin moves to 7.

baseUrl here only anchors `paths`, and `paths` has not needed it since
TypeScript 4.4 — entries resolve relative to the tsconfig that declares
them. Two of the three had to gain a "./" prefix; the third was already
relative.

Chose this over `"ignoreDeprecations": "6.0"`: that key silences the
message for one major version and has to be revisited, while this makes
the config correct.

Nothing relies on baseUrl for bare-specifier resolution — there are no
`from "src/..."`-style imports under app/src.

vite.config.ts declares the alias itself with
`"@": resolve(__dirname, "src")`, so the build never reads this setting;
the change is type-level only.

Verified: tsc --noEmit gives byte-identical output before and after (7
errors either way, all from packages/tauri-plugin-ptt, which resolves its
own deps outside app/). No `Cannot find module '@/...'` appears, with 33
files under app/src importing through the alias. Re-checked under
TypeScript 6.0.3: the deprecation is gone and nothing replaces it.
@ntdatt812
ntdatt812 requested a review from a team September 7, 2026 13:08

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

$0.0000 · 0 in / 0 out · 30 embedded · openrouter/openai/text-embedding-3-small

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Sep 7, 2026
@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 66bae01b-960f-49a3-905b-99aa65dacb47

📥 Commits

Reviewing files that changed from the base of the PR and between ebe2aa6 and 9a68261.

📒 Files selected for processing (1)
  • app/tsconfig.json

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The app TypeScript configuration removes baseUrl and updates two path aliases to use explicit ./src/... paths.

Changes

TypeScript path resolution

Layer / File(s) Summary
Update TypeScript path aliases
app/tsconfig.json
Removes baseUrl and updates the @/* and @openhuman/skill-types mappings to use ./src/.... The tauri-plugin-ptt-api mapping remains unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: senamakel

Merge Risk: ⚪ Minimal · up to 9a682

The TypeScript configuration update removes the deprecated option and keeps aliases explicitly relative, with no remaining merge-readiness risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing baseUrl from app/tsconfig.json to support future TypeScript 7 compatibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

@ntdatt812

Copy link
Copy Markdown
Contributor Author

The red Frontend Checks here is not from this change, and it is worth saying why it showed up on a PR that only edits tsconfig.json.

paths-filter classifies a tsconfig edit as a config-level change, so the job escalates to the full suite rather than the changed-file subset:

[ci][vitest-changed] running FULL Vitest coverage suite
  (reason: config/workflow-level change detected by paths-filter)

Exactly one test in that full run failed — SandboxSettingsPanel.validation.test.tsx > persists a positive integer — with a DOM dump still showing Loading…. Its renderLoaded helper waits for mockGet to have been called, which is already true on waitFor's first tick because the panel calls it synchronously in its mount effect; the synchronous getBy* accessors then run before isLoading flips.

Filed separately as #6064, with a deterministic reproduction. It is unrelated to baseUrl — vitest resolves @ from the explicit alias in test/vitest.config.ts, not from tsconfig, so nothing in this PR can reach it.

@senamakel senamakel self-assigned this Sep 12, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T02:30:25.965974Z c65cc25 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@senamakel
senamakel merged commit a655dae into tinyhumansai:main Sep 12, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants