Skip to content

fix(kirari): classify TypeScript members after semicolons - #10

Merged
ugi-dev merged 1 commit into
mainfrom
fix/3-typescript-member-properties
Oct 22, 2026
Merged

ugi-dev merged 1 commit into
mainfrom
fix/3-typescript-member-properties

Conversation

@ugi-dev

@ugi-dev ugi-dev commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

What and why

Fix TypeScript and TSX member names after semicolons being highlighted as variables. For example, class Box { v: T; w: string } now highlights both v and w as properties, consistent with interface and object type members.

The shared scanner previously recognized property names only after { and ,. Extend that condition to ; in existing TypeScript member scopes, preserving statement labels, constructor annotations, and function-valued member detection. No public API changes or dependencies.

Closes #3

Validation

  • bun run check and bun run test pass.
  • Regression coverage includes TypeScript/TSX members, comments and newlines, labels in methods and static blocks, constructor annotations, function-valued fields, and streaming prefixes.
  • An expanded streaming fuzz run passes 14,000 generated cases.
  • 195,830 comparisons against main show only the intended member-category changes; token contents and offsets remain identical.
  • Default JavaScript bundle: 4,247 → 4,252 bytes gzipped (+5 bytes), within the 4,400-byte budget.

The browser harness passes the new corpus fixtures, then hits an existing decoration line-count assertion failure also reproduced on untouched main. Its remaining checks do not run. The docs build also reports five filesystem-tracing warnings in unchanged changelog code.

Checklist

  • bun run check passes
  • Tests cover the change
  • Changeset added (bunx changeset), or not needed for docs, tests, or internal changes
  • Docs updated if behavior or APIs changed

Summary by CodeRabbit

  • Bug Fixes

    • Fixed TypeScript and TSX member names after semicolons being highlighted as variables instead of properties.
    • Improved highlighting consistency across class, interface, and object type definitions.
  • Documentation

    • Added the Kirari 1.1.2 changelog entry describing the highlighting fix.
  • Tests

    • Added coverage for semicolon-separated members, typed class fields, constructor parameter properties, and JSX/TSX scenarios.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

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-10-22T00:50:19.962410Z f236510 PR opened
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 46b5c6cd-3c60-4c78-af98-61c2b24b6902
📥 Commits

Reviewing files that changed from the base of the PR and between d9bc819 and f236510.

📒 Files selected for processing: 7
  • .changeset/fix-semicolon-members.md
  • packages/kirari/src/tokenize.ts
  • packages/kirari/test/corpus/fixtures.ts
  • packages/kirari/test/function-highlighting.test.ts
  • packages/kirari/test/script-accuracy.test.ts
  • packages/kirari/test/stream-fuzz.test.ts
  • sites/docs/changelog/kirari/1.1.2.md

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

The tokenizer now classifies TypeScript and TSX member names after semicolons as properties. New tests cover class, interface, and TSX inputs, including streaming-token parity. The changeset and changelog describe the fix.

Changes

Semicolon member highlighting

Layer / File(s) Summary
Property classification and validation
packages/kirari/src/tokenize.ts, packages/kirari/test/corpus/fixtures.ts, packages/kirari/test/function-highlighting.test.ts, packages/kirari/test/script-accuracy.test.ts, packages/kirari/test/stream-fuzz.test.ts, .changeset/fix-semicolon-members.md, sites/docs/changelog/kirari/1.1.2.md
Typed method members after semicolons are classified as properties. Tests cover TypeScript and TSX member highlighting, token categories, streaming parity, and fuzz inputs. The changeset and changelog document the fix.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to f2365

No actionable merge-blocking risk remains from the reviewed changes.

Pre-merge checks: Passed 5
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: classifying TypeScript members after semicolons as properties.
Linked Issues check Passed Issue #3 requires TypeScript and TSX member names after semicolons to use the property category. packages/kirari/src/tokenize.ts now applies that category when typed && method, the previous toke…
Out of Scope Changes check Passed The changes stay within issue #3. The production change modifies one shared scanner condition. The added tests verify the semicolon member fix and its stated compatibility cases. The changeset and cha…
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 5…
Full details: Linked Issues check

Explanation

Issue #3 requires TypeScript and TSX member names after semicolons to use the property category. packages/kirari/src/tokenize.ts now applies that category when typed && method, the previous token is ;, and the next visible character is :. The tests cover class, interface, type-alias, multiline, and TSX cases. They also cover labels, constructor annotations, streaming parity, and function-valued fields. These tests preserve the required surrounding behavior.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #3. The production change modifies one shared scanner condition. The added tests verify the semicolon member fix and its stated compatibility cases. The changeset and changelog document the fix. No public API, dependency, or unrelated behavior change is shown.

Full details: Docstring Coverage

Explanation

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 5 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@ugi-dev
ugi-dev merged commit be67e38 into main Oct 22, 2026
5 checks passed
@ugi-dev
ugi-dev deleted the fix/3-typescript-member-properties branch October 22, 2026 02:41
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.

TypeScript member names after ; are variable instead of property

1 participant