Skip to content

feat: stabilize TextMate syntax rendering#111

Merged
SSobol77 merged 1 commit into
issue/101-textmate-grammar-catalog-language-detectionfrom
issue/102-extension-backed-syntax-service-editor-rendering
Jun 21, 2026
Merged

feat: stabilize TextMate syntax rendering#111
SSobol77 merged 1 commit into
issue/101-textmate-grammar-catalog-language-detectionfrom
issue/102-extension-backed-syntax-service-editor-rendering

Conversation

@SSobol77

Copy link
Copy Markdown
Owner

Summary

This PR completes issue #102: extension-backed TextMate syntax rendering for ECLI.

It stabilizes TextMate-backed syntax highlighting, extension-backed theme discovery, theme numbering, large-file rendering performance, multiline comment/string rendering, and real acceptance coverage.

What changed

  • Added extension-backed TextMate tokenization through ECLI-owned integration code.
  • Added extension-backed theme registry from imported VS Code/TextMate metadata.
  • Added stable theme numbering contract:
    • 1-8 = deprecated aliases for old configs only
    • 100-199 = light themes
    • 200-299 = dark themes
    • 300-399 = high contrast themes
    • 800-899 = reserved for future custom/imported special themes
  • Set default professional theme to 207 = Dark+.
  • Preserved legacy ECLI/PySH themes as compatibility themes.
  • Added user-config migration and backup behavior for old theme ids.
  • Cleaned config.toml so it remains user-facing and does not expose internal syntax/comment tables.
  • Added TextMate dependency documentation for python-textmate, onigurumacffi, and Oniguruma source-build requirements.
  • Implemented viewport-first bounded rendering with caches and tokenizer budgets.
  • Fixed large-file scrolling freezes caused by pathological Makefile tokenization.
  • Added multiline comment/string protection for:
    • Python
    • JavaScript
    • TypeScript
    • HTML
    • CSS
  • Fixed .log and .gitignore language detection so they do not resolve as SQL or Transact-SQL.
  • Preserved deterministic fallback behavior for missing grammars, tokenizer errors, and unsupported files.
  • Added real rendering, performance, PTY, config, theme-numbering, dependency, and multiline acceptance tests.
  • Kept imported upstream extension assets unchanged.

Manual validation

Manual visual validation was performed in uv run ecli.

Confirmed:

  • multiline Python strings/docstrings render correctly
  • JavaScript multiline comments render correctly
  • TypeScript multiline comments render correctly
  • HTML multiline comments render correctly
  • CSS multiline comments render correctly
  • Makefile scrolling no longer freezes the terminal
  • logs and ignore files no longer resolve as SQL/Transact-SQL
  • TextMate theme rendering is visibly improved and stable

Validation

Validated locally with:

  • uv run ruff check src tests
  • uv run ruff format --check src tests
  • uv run python scripts/check_runtime_imports.py
  • uv run mypy src/ecli/extensions/ecli_integration
  • uv run pytest -q tests/extensions tests/packaging tests/docs tests/core/test_config_loading.py tests/core/test_syntax_highlighting_toggle.py tests/ui/test_terminal_panel_reservation.py tests/ui/test_pysh_console_panel.py tests/ui/test_pysh_console_panel_keybindings.py
  • uv run pytest -q tests/extensions/test_textmate_tokenization.py tests/extensions/test_theme_bridge_priority.py tests/extensions/test_editor_syntax_rendering.py tests/extensions/test_textmate_render_performance.py tests/extensions/test_textmate_tokenizer_budget.py tests/extensions/test_textmate_render_regressions.py tests/extensions/test_textmate_scroll_regression.py tests/extensions/test_textmate_multiline_protection.py tests/ui/test_textmate_scroll_pty_smoke.py

Observed before push:

  • main validation suite: 713 passed
  • focused TextMate/performance/multiline suite: 79 passed
  • ruff: passed
  • format check: passed
  • runtime import check: passed
  • mypy: passed
  • imported upstream extension check: no upstream extension assets modified

Scope boundaries

Not changed:

  • F11 PySH Console Panel behavior
  • future F4 Diagnostics / Linter Panel
  • future F7 AI Code Assistant
  • VMLab / QEMU / QMP
  • imported upstream extension assets
  • VS Code extension host runtime
  • Node/TypeScript activation
  • Copilot runtime
  • package.json script execution
  • generic PTY terminal emulator scope

Follow-up

After this PR is merged, the next Extensions-layer milestone is:

  1. F4 Diagnostics / Linter Panel
  2. F7 AI Code Assistant as extensions layer
  3. plugin layer for new themes, linters, and AI extensions

- add extension-backed TextMate tokenization and theme registry
- define stable theme numbering contract and migration behavior
- preserve legacy ECLI/PySH themes as compatibility themes
- implement viewport-first bounded rendering with tokenizer budgets and caches
- fix large-file scrolling freezes on Makefile and logs
- protect multiline comments and strings across Python, JavaScript, TypeScript, HTML, and CSS
- prevent log and ignore files from resolving as SQL or Transact-SQL
- document TextMate, onigurumacffi, and Oniguruma packaging requirements
- add real rendering, performance, PTY, config, and multiline acceptance tests
- keep imported upstream extension assets unchanged
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: efb293a7-8d52-4695-a99a-48d54d99bfcf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue/102-extension-backed-syntax-service-editor-rendering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@SSobol77 SSobol77 merged commit 3330f57 into issue/101-textmate-grammar-catalog-language-detection Jun 21, 2026
2 of 3 checks passed
@SSobol77 SSobol77 deleted the issue/102-extension-backed-syntax-service-editor-rendering branch June 21, 2026 19:06
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant