Repository navigation
Conversation
Fenced diff, Kotlin, Dart and SQL blocks rendered as plain text: no grammar covered them, and Swift only by opt-in. Diffs are line-oriented, so the shared seam classifies them line by line instead of with a grammar: added and removed lines get two new token types, inserted and deleted, hunk ranges the function color and file headers the constant color. Inside a hunk whose header gives line counts, "--- x" and "+++ x" are changed lines, not headers. The existing size caps apply. Kotlin (tree-sitter-kotlin 0.3.8), Dart (tree-sitter-dart 1.0.0) and SQL (@derekstride/tree-sitter-sql 0.3.11) join the opt-in grammar tier, with kt/kts and mysql/postgres/postgresql/pgsql/sqlite aliases and diff/patch fences. Host doctest coverage for the seam lands in packages/core/cpp/tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries software-mansion#1153 on the T3 mobile archive branch. The upstream branch contains only the highlighting changes; this branch preserves the existing T3 fork changes.
Fenced diff blocks currently have no highlighting, and Kotlin, Dart and SQL have no compiled grammar option. Add bounded diff-line highlighting and opt-in pinned grammars for those languages, with inserted/deleted token colors across the native renderers. Existing code-block layout, selection, copy and wrapping remain in their native containers.
The shared C++ regression suite covers aliases, Unicode offsets, diff headers and hunks, size limits, and the new languages. The final focused run on the archive source passed 10 cases and 579 assertions; the new keyword/function assertions failed before their fix. Android verification is complete in the T3 Code consumer at
d973d8f2fd845d23925e68589a5aaf8878796496, using archive source23ce6af473d93ce8fc66fb760d447c36a11ba18e. A physical POCO F4 on Android 14 shows diff, Kotlin, Swift, Dart and SQL colors in both themes. Wrap and Copy work, ordinary Markdown selection still works, and a free Replay turn streams and finishes. Before/after captures, recordings and test output include the exact build provenance. The upstream and archive changes have matching stable patch IDs.The consumer opts into Swift plus the three new grammars. Its ARM64 debug APK grew by 9.97 MiB. Release size and iOS runtime remain unverified. SQL strings can still receive the number color because existing query predicates are not evaluated. Android code-block long press retains Copy menus; it did not provide selection handles before this change. Streaming verification is a smoke pass, not continuous observation of an open fence.
Swift already has an opt-in grammar. This change leaves the default grammar set unchanged. Query predicates remain unsupported; Dart's predicate-dependent identifier heuristics are skipped so structural function/type captures retain their colors.
The docs and CI runs at
23ce6af473d93ce8fc66fb760d447c36a11ba18erequire repository maintainer approval before jobs can start. Both runs contain zero jobs; this account has read-only repository permissions.Refs pingdotgg/t3code#33638.
Implemented by Claude Opus 5.5 in Claude Code; investigated and reviewed by GPT-6.1 Sol in Codex.
Note
Add Kotlin, Dart, SQL grammar highlighting and grammar-free diff/patch coloring
InsertedandDeletedtoken types for diff lines with default colors (#3FB950 / #F85149), wired through the core enum, Android, iOS, and React Native style APIsMacroscope summarized 23ce6af.