Skip to content

refactor(ui): update the UI of the code file#1826

Merged
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
zyd123-cmd:main
Jan 22, 2026
Merged

refactor(ui): update the UI of the code file#1826
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
zyd123-cmd:main

Conversation

@zyd123-cmd

Copy link
Copy Markdown
Contributor

code部分查看代码宽度可拖动

@genedna

genedna commented Jan 21, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d0ed0f69c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +34 to +37
useEffect(() => {
if (containerRef.current && leftWidth === null) {
setLeftWidth(containerRef.current.offsetWidth * DEFAULT_LEFT_WIDTH_PERCENT)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Recalculate left panel width when container resizes

This width is only initialized once (when leftWidth is null), so after the initial render the left panel stays at a fixed pixel width even if the viewport/container width changes (e.g., the user resizes the browser or sidebars collapse). That’s a regression from the previous percentage-based layout: the left panel can exceed the intended max percentage and the right panel can end up narrower than MIN_RIGHT_WIDTH, leading to cramped or hidden code content on narrower windows. Consider listening for resize (or using a ResizeObserver) to recompute/clamp leftWidth whenever the container width changes.

Useful? React with 👍 / 👎.

@benjamin-747 benjamin-747 added this pull request to the merge queue Jan 22, 2026
Merged via the queue into gitmono-dev:main with commit 4d0ee53 Jan 22, 2026
7 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.

3 participants