[Bug]: TypeScript compiler locations lose line and column in terminal links

Ouverte
#36,183 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@saphitv y travaille déjà.

Depuis le 13/11/2026.

  • #36174 par @saphitv — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
30/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
typescript
Domaine
desktop, frontend

Piste de recherche

The bug is in the terminal link parser and resolver in apps/web, which desktop shares, and the report shows that path(line,col) diagnostics lose their coordinates before shell.openInEditor is called. Start by reproducing with tsc --pretty false output and comparing it with the working path:line:col form. Done means relative and absolute parenthesized locations open at the correct line and column with the link range excluding the trailing colon. Open PR #36174 already targets this, so coordinate with it before writing a competing fix.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web (also used by desktop's integrated terminal)

Steps to reproduce
  1. From a T3 Code repository checkout with dependencies installed, create a disposable reproduction project:
(
  demo=$(mktemp -d)
  mkdir -p "$demo/src"
  ln -s "$PWD/apps/marketing/node_modules/typescript/bin/tsc" "$demo/tsc"
  {
    printf '\n%.0s' {1..41}
    printf 'const answer: number = "no";\n'
  } > "$demo/src/main.ts"
  printf 'Reproduction project: %s\n' "$demo"
)
  1. Add the printed directory as a project in T3 Code, create a thread, and open its integrated terminal. This makes the terminal link base match the compiler's project root.
  2. In that terminal, run:
./tsc --pretty false --noEmit src/main.ts

The actual compiler output begins:

src/main.ts(42,7): error TS2322: Type 'string' is not assignable to type 'number'.

Hover and Ctrl-click the diagnostic filename (Cmd-click on macOS).

Expected behavior

The editor opens src/main.ts at line 42, column 7. The link range includes the parenthesized location and excludes the trailing colon.

Actual behavior

Only src/main.ts is linked for this relative diagnostic. Clicking opens the file without the location. Capturing the real integrated client's shell.openInEditor request confirms that its target contains the path with no line or column. Absolute parenthesized diagnostic paths also are not understood by the terminal resolver and are treated as literal filenames; that absolute-form failure was verified at the parser/resolver layer.

Impact

Minor bug or occasional failure. Navigation to the diagnostic location is lost, although the relative-path case still opens the correct file.

Version or commit

Verified in the published nightly 0.1.10-nightly.20261113.4630, release commit 7e1a05808aaf5df39fe9d20cc5c3603f3978696a, using the unmodified released Linux x64 server and its bundled web client. Also reproduced on upstream main at 2d8a843e6be9.

Environment

Linux, published nightly server and bundled web client, TypeScript 6.0.3, isolated T3 base directory. The web parser is shared with desktop. No agent turn or source build of T3 Code was used for the nightly verification.

Verified reproduction in the published nightly

Release: v0.1.10-nightly.20261113.4630. The downloaded Linux x64 archive matched the release's SHA256SUMS, and the running server reported serverVersion: 0.1.10-nightly.20261113.4630. No T3 Code source changes or fixture RPC responses were used.

  1. Follow the setup above to create the disposable directory containing src/main.ts and the TypeScript compiler symlink.
  2. Add that directory itself as a project in the installed/nightly T3 Code app. Select the project's current checkout, start a new thread, and open its integrated terminal. Merely changing directories in a terminal belonging to another project is insufficient: links resolve against T3's project root.
  3. Run ./tsc --pretty false. This executes TypeScript 6.0.3 and prints the real src/main.ts(42,7): error TS2322: ... diagnostic.
  4. Hover and Ctrl-click the filename. The underline stops at src/main.ts, and the real editor-opening request omits both coordinates:
{
  "cwd": "/tmp/t3-nightly-terminal-repro/src/main.ts",
  "editor": "vscode",
  "projectRoot": "/tmp/t3-nightly-terminal-repro"
}
  1. Control: run ./tsc --pretty true and Ctrl-click its src/main.ts:42:7 location. The same released client now sends:
{
  "cwd": "/tmp/t3-nightly-terminal-repro/src/main.ts:42:7",
  "editor": "vscode",
  "projectRoot": "/tmp/t3-nightly-terminal-repro"
}

The screenshot below is from the actual published nightly, after running the compiler and hovering the affected link. The two requests above were captured from real clicks, not inferred from the underline. Use Cmd-click instead on macOS.

Open the nightly reproduction screenshot (PNG).

Published nightly links the TypeScript filename but omits the parenthesized location

Supporting evidence

Real integrated-client hover and click evidence is included in the linked fix PR: https://github.com/pingdotgg/t3code/pull/36174.

Workaround

Use --pretty true where practical: its src/main.ts:42:7 format is already supported. This report concerns TypeScript's non-pretty parenthesized diagnostic locations.

Langage dominant
TypeScript
Étoiles
24.8k
Forks
6.4k
Merge moyen
59 min
PR mergées (30 j)
418

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de pingdotgg/t3code

Toutes les issues de pingdotgg/t3code

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.