Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions agent-feedback/bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ A custom tag that fails to resolve (a component referenced by kebab tag name wit
`packages/ts-plugin/build.mts` › `build` | 2026-07-24 | impact:low | effort:low

The `banner.js` that defines `_importMetaUrl` is emitted above esbuild's own `"use strict"`, so that string is no longer a directive prologue and the bundle runs in sloppy mode: `head -2 packages/ts-plugin/dist/index.js` shows the `const` on line 1 and `"use strict";` on line 2. The same applies to all three `packages/vscode/dist/*.js` bundles, which share the pattern via `packages/vscode/build.mts`. Bundled TS rarely depends on strict semantics, so nothing is known to break today, but silently dropping strict mode is not what either build intends. Fix by prefixing the banner with `"use strict";\n` (as `packages/language-tools/build.mts` does); re-verify with `head -2` on each bundle.

## Emit an unquoted key for identifier-safe attribute names so TypeScript can suggest the near-miss spelling

`packages/language-tools/src/extractors/script/index.ts` › `#writeAttrs` | 2026-07-30 | impact:med | effort:low

`#writeAttrs` wraps every named attribute key in quotes (`.write('"').anchor(defaultMapPosition).copy(name).write('"')` at l.1052, 1063, 1166, 1224), and TypeScript computes an excess-property spelling suggestion only when the key node is an identifier, so every identifier-safe attribute typo loses its "Did you mean…?". `<input onKeydown(e) {}/>` extracts as `"onKeydown"(e){}`, and `mtc` (`packages/type-check`) and the LSP report the bare TS2353 "Object literal may only specify known properties, and '\"onKeydown\"' does not exist in type 'Directives & Input'", where the identical object with an identifier key reports TS2561 "…Did you mean to write 'onKeyDown'?". That reads as "this element takes no event handlers" rather than "you got the casing wrong" — and upstream the runtime binds it fine (marko's `getEventHandlerName` lowercases everything after `on`, so only marko's `tags-html.d.ts` insists on exact camelCase), which is exactly why the type layer's message should name the right spelling. Quoting is required for names that are not valid identifiers (`on-click`, `data-x`, `class:foo`), so gate it: reuse the existing `REG_OBJECT_PROPERTY` (l.52) and `copy(name)` unquoted when it matches, keeping the `anchor(defaultMapPosition)` mapping for the default-attr case; snapshots barely move because prettier already prints these keys unquoted. Distinct from the `#writeTag` "cannot resolve tag" entry above — that is a missing diagnostic, this is a present diagnostic missing its suggestion. Re-verify by adding `<input onKeydown(e) {}/>` as `packages/language-server/src/__tests__/fixtures/script/attr-name-typo/index.marko`, running `pnpm run test:server`, and reading the `## Diagnostics` block of the generated `__snapshots__/attr-name-typo.expected/index.md`.