GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(activity): highlight Windows commands with the right shell grammar by gero3 · Pull Request #40470 · pingdotgg/t3code

Conversation

@gero3

@gero3 gero3 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Problem

The activity log uses Unix shell highlighting for lowercase PowerShell cmdlets and CMD commands. For example, it treats the percent-delimited environment variable in a CMD script as ordinary quoted text.

  1. On Windows, have an agent run get-childitem -Force and cmd.exe /c "echo %TEMP% & dir" as separate shell calls.
  2. Expand the activity group and each command. The command details should use PowerShell and Batch highlighting, respectively.

Change

Match selected common cmdlets by full name regardless of case and keep the existing title-case recognition. Select the built-in Batch grammar for explicit CMD invocations and recognizable batch syntax. Web and desktop use the shared classifier, and mobile accepts its Batch result through the existing native lexer. The original command text stays available for selection and copying.

Scope

This fixes one syntax-highlighting bug on already-supported shells. The two short reproductions show the bug directly, so a separate issue is unnecessary.

Verification

  • Against origin/main at dd941b9c3b, 11 of the 23 shared grammar cases failed. All 23 passed with the patch.
  • In a local Windows web work log with a seeded fixture, both Windows commands rendered with the expected grammar and their exact command text was selectable. The screenshots below capture the same web command renderer in dark mode with identical inputs, including the GNU install-info command whose name resembles a cmdlet.
  • Mobile's WASM-backed test harness produced the expected PowerShell and Batch tokens and preserved the sample text. Native device access was unavailable.
  • 132 focused tests and 2 web browser tests passed. vp run check:changed origin/main also passed, including type checks for seven affected packages.

Before and after

Before — Unix shell colors on both Windows examples

After — PowerShell and Batch colors, with Unix examples preserved

Model: GPT-6.2 Sol. Harness: Codex in T3 Code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gero3
fix(activity): highlight Windows commands with the right shell grammar
e27514f
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Command language detection now returns PowerShell, Batch, or shell-script. The mobile highlight function uses the shared language type, and tests cover language selection for command examples.

Changes: Command highlighting

Layer / File(s) Summary
Command language classification and tests
packages/client-runtime/src/work-log/commandLabel.ts, packages/client-runtime/src/work-log/commandLabel.test.ts
commandHighlightLanguage now recognizes PowerShell, Batch, and shell-script commands. PowerShell detection includes additional cmdlets and call-operator syntax. Tests cover language selection across command examples.
Mobile highlight language type
apps/mobile/src/lib/highlights.ts
highlightCommand now uses the shared CommandHighlightLanguage type. Its implementation is unchanged.

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

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#15037: Selects command display grammars based on executable names, which overlaps with this change’s command-to-language selection.

Suggested reviewers: juliusmarminge, yash-singh1, macroscopeapp

Merge Risk: Minimal · up to e2751

This change improves syntax highlighting for Windows PowerShell and CMD commands in the activity log. No actionable merge-blocking risk was found, and the original command text is unchanged.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(activity): highlight Windows commands with the right shell grammar" matches the main change: the classifier now picks PowerShell or Batch grammar for Windows commands instead of Unix sh…
Description check Passed The description follows the repository template. It has Problem, Change, Scope, and Verification sections, plus before/after screenshots and a model/harness line. The Problem section gives reproductio…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(activity): highlight Windows commands with the right shell grammar" matches the main change: the classifier now picks PowerShell or Batch grammar for Windows commands instead of Unix shell highlighting. It is specific and follows the conventional commit style the repository template asks for. The title is 70 characters, which is within a typical length limit.

Full details: Description check

Explanation

The description follows the repository template. It has Problem, Change, Scope, and Verification sections, plus before/after screenshots and a model/harness line. The Problem section gives reproduction steps. The Change section explains the classifier and mobile handling. The Scope section explains why no separate issue is needed. The Verification section gives focused test counts and a manual web check, and it states that native mobile device access was unavailable. The template's optional comment about evidence upload is satisfied by the embedded GitHub-hosted images. The description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 1cedd4b
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c57558ce-41dc-4cb8-be21-fbfd00b38881
Commits

Reviewing files that changed from the base of the PR and between 1cedd4b and e27514f.

Files selected for processing: 3

  • apps/mobile/src/lib/highlights.ts
  • packages/client-runtime/src/work-log/commandLabel.test.ts
  • packages/client-runtime/src/work-log/commandLabel.ts

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@gero3
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.