Skip to content

Conversation

@nowgnuesLee
Copy link
Contributor

@nowgnuesLee nowgnuesLee commented Jan 7, 2026

resolves #4879 (FR-1816)

This PR replaces the old SourceCodeViewer component with a new SourceCodeView component that:

  1. Uses our existing SyntaxHighlighter component for code highlighting
  2. Provides a consistent UI with a header showing the language and copy button
  3. Improves the styling and layout of code blocks throughout the application

CleanShot 2026-01-07 at 16.12.24@2x.png

The PR also adds a feature to view startup commands for batch sessions in the session detail view.

CleanShot 2026-01-08 at 13.51.55@2x.png

Checklist:

  • Documentation
  • Minium required manager version (Manager 25.15)
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Copilot AI review requested due to automatic review settings January 7, 2026 07:11
@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization size:L 100~500 LoC labels Jan 7, 2026
Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nowgnuesLee nowgnuesLee marked this pull request as ready for review January 7, 2026 07:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a feature to display the startup command for batch sessions in the session detail panel. When viewing a batch session, users can now click an info button next to the session type to view the startup command in a modal. Additionally, the PR refactors the SourceCodeViewer component to SourceCodeView, which uses a different syntax highlighting implementation and removes the react-syntax-highlighter dependency.

Key changes:

  • Added startup command display modal for batch sessions with i18n support across all 21 languages
  • Refactored SourceCodeViewer component to SourceCodeView with improved UI consistency
  • Removed react-syntax-highlighter and @types/react-syntax-highlighter dependencies

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
resources/i18n/*.json (21 files) Added "StartupCommand" and "ViewStartupCommand" translation keys for all supported languages
react/src/components/SourceCodeView.tsx New component replacing SourceCodeViewer with improved styling using Chat components
react/src/components/SourceCodeViewer.tsx Deleted old component in favor of new SourceCodeView
react/src/components/SessionDetailContent.tsx Added startup command modal feature with info button for batch sessions, fetches type and startup_command fields
react/src/components/SessionLauncherPreview.tsx Updated to use new SourceCodeView component
react/src/components/ComputeSessionNodeItems/SFTPConnectionInfoModal.tsx Updated to use new SourceCodeView component with improved layout
react/src/components/Chat/SyntaxHighlighter.tsx Added props spreading to accept additional HTML attributes
react/src/index.tsx Updated web component to use SourceCodeView and removed wordWrap prop
react/package.json Removed react-syntax-highlighter and its type definitions

@nowgnuesLee nowgnuesLee force-pushed the feat/display-startup-command-for-batch-session branch from 0ff914d to ca6ec2b Compare January 7, 2026 07:21
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.91% (+0% 🔼)
589/11984
🔴 Branches
4.48% (+0.01% 🔼)
377/8414
🔴 Functions
2.75% (+0% 🔼)
101/3674
🔴 Lines
4.74% (+0% 🔼)
555/11702
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / CodeHighlighterModal.tsx
0% 100% 0% 0%
🔴
... / SourceCodeView.tsx
0% 0% 0% 0%

Test suite run success

173 tests passing in 13 suites.

Report generated by 🧪jest coverage report action from 88e8b24

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 30 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 30 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@nowgnuesLee nowgnuesLee force-pushed the feat/display-startup-command-for-batch-session branch from ca6ec2b to 980cc58 Compare January 7, 2026 07:44
@nowgnuesLee nowgnuesLee requested a review from Copilot January 7, 2026 07:44
@nowgnuesLee nowgnuesLee requested review from agatha197, ironAiken2 and yomybaby and removed request for Copilot January 7, 2026 07:48
Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you unify the width? I know it's antd's default style, but it looks awkward.

image.png

Copilot AI review requested due to automatic review settings January 8, 2026 04:46
@nowgnuesLee nowgnuesLee force-pushed the feat/display-startup-command-for-batch-session branch from 980cc58 to 47b74cb Compare January 8, 2026 04:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@nowgnuesLee nowgnuesLee force-pushed the feat/display-startup-command-for-batch-session branch from 47b74cb to 88e8b24 Compare January 8, 2026 04:51
@nowgnuesLee nowgnuesLee requested a review from agatha197 January 8, 2026 04:53
Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Labels

area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

display startup command for batch session in the Session detail panel

4 participants