Skip to content

fix(editor): highlight Justfile recipes and mobile HCL assignments - #35573

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/monaco-issue-verification
Oct 29, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/monaco-issue-verification

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​37 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​37
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5

ELI5

Justfiles now color shell recipes and comments instead of appearing as plain text. Mobile Terraform files gain basic assignment, string, and comment highlighting.

What Changed

  • Reuse shared filename detection for justfile, Justfile, .justfile, and *.just, using the existing shell grammar on desktop and Bash on mobile.
  • Resolve mobile HCL to the bundled INI grammar. This is basic highlighting, not a full HCL grammar.
  • Keep desktop .tfvars on its existing HCL support from fix(editor): recognize all bundled Monaco language associations #23371.

Why

Both clients already share language detection. These associations and the existing mobile grammar fallback fix the remaining cases without adding dependencies or parallel maps. Shell covers Just recipes; Just-specific interpolation and attributes remain outside its grammar.

Adapted from the remaining proposal in closed, unmerged #11256, which invited a fresh current-main PR after backlog cleanup.

Linked Issue

Fixes #11215

Visual Proof

Same Justfile in a folder workspace, Linux hidden Electron/CDP, light theme:

Before:

(screenshot removed: contained real product data)

After:

(screenshot removed: contained real product data)

Testing

  • Automated regression tests: 9 new mobile cases fail before the change; all 46 mobile syntax tests pass after it. Assertions check semantic tokens, exact source preservation, and diff highlighting.
  • All 196 shared language detection/association tests pass.
  • Hidden Linux Electron: seven real folder-workspace files (justfile, Justfile, .justfile, .just, dev.tfvars, main.tf, control.sh) render highlighted in light and dark themes. Baseline Justfile renders plain in both themes; screenshots inspected.
  • Desktop Electron/renderer and CLI builds used for the rendered checks.
  • git diff --check and independent code review.
  • Required broad changed gate is not green: all 21 other checks pass. The first affected-unit run failed loading temporary Vite modules while /tmp was at99% inode usage. An isolated temporary-directory rerun hit30 minutes; the final --timeout=60 run also timed out at60 minutes and logged ECONNREFUSED for ::1:3000 and 127.0.0.1:3000. Neither timeout produced a completed test summary. Focused and rendered evidence above passes; the broad affected-unit gate remains unresolved.

Native macOS/Windows, native mobile apps, and a live SSH host were not run. Existing path/case handling is unchanged; both clients share the same detector and no transport, filesystem, process, or platform APIs change.

Review

Independent review found no blockers. No new dependencies, IPC, background work, or model ownership changes. Mobile grammar approximation and Just-specific grammar limits are deliberate.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer material is copied or translated.

Checklist

  • Small, focused change; behavior and grammar limits explained.
  • Before/after visual proof attached.
  • Correctness, performance, mobile, folder workspaces, remote compatibility, and cross-platform paths considered.
  • Full required changed gate green; broad affected-unit run timed out at60 minutes, as disclosed above.

@OrcaWin OrcaWin closed this Oct 29, 2026
@OrcaWin
OrcaWin force-pushed the OrcaWin/monaco-issue-verification branch from 335d869 to fa2a5d2 Compare October 29, 2026 04:23
@OrcaWin OrcaWin reopened this Oct 29, 2026
@OrcaWin
OrcaWin marked this pull request as ready for review October 29, 2026 04:24
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The code changes appear safe to merge; no actionable defects were found.

Summary

Adds Justfile highlighting through the shared filename detector and basic HCL highlighting on mobile.

  • Justfile recipes now use shell highlighting.
  • Mobile HCL files now get basic syntax highlighting.

OrcaWin explicitly acknowledges the limited grammar coverage and the unresolved broad affected-unit gate.

Reviews (1) · Last reviewed commit: "fix(editor): highlight Justfile recipes ..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aa85e1d9-d339-4c13-b781-786ab569f686
Commits

Reviewing files that changed from the base of the PR and between fa2a5d2 and c42178c.

Files selected for processing: 3
  • mobile/src/session/mobile-file-syntax.test.ts
  • mobile/src/session/mobile-file-syntax.ts
  • src/shared/editor-language/editor-language-detect.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Walkthrough

The shared language detector now maps .just, Justfile, and .justfile to shell. The mobile syntax highlighter maps hcl to the bundled ini grammar. New tests cover Justfile and HCL highlighting, source-text preservation, and HCL diff-line strings.

Priority: Low

Severity of issue fixed: Low

Merge Risk: Minimal · up to c4217

The syntax-highlighting changes are mergeable; focused source and test-path inspection found no material behavior risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the two main changes: Justfile recipe highlighting and mobile HCL assignment highlighting.
Description check Passed The description is complete and specific. It covers the user impact, implementation, rationale, linked issue, visual proof, tests, limitations, and unresolved broad test-gate status.
Linked Issues check Passed #11215 requires highlighting for Justfile name variants and .tfvars. The reviewed source maps .just to shell, and maps Justfile and .justfile to shell; the case-insensitive lookup also cov…
Out of Scope Changes check Passed The changes stay within #11215. They add shared Justfile detection, the mobile HCL grammar fallback, and focused regression tests. No unrelated product behavior or dependency changes are shown.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

#11215 requires highlighting for Justfile name variants and .tfvars. The reviewed source maps .just to shell, and maps Justfile and .justfile to shell; the case-insensitive lookup also covers justfile. The PR evidence states that desktop .tfvars already uses HCL and that mobile maps HCL to the bundled INI grammar. The added mobile tests cover Justfile variants and HCL files. The reported shared detection and mobile syntax tests pass.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@OrcaWin
OrcaWin merged commit 4a5e102 into main Oct 29, 2026
81 checks passed
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.

[Bug]: justfiles and .tfvars files have no syntax highlighting

1 participant