Skip to content

fix(viewer): wrap long session metadata on mobile - #1458

Merged
lizhengfeng101 merged 2 commits into
alibaba:mainfrom
dvd233:codex/fix/viewer-meta-wrap-1455
Sep 22, 2026
Merged

lizhengfeng101 merged 2 commits into
alibaba:mainfrom
dvd233:codex/fix/viewer-meta-wrap-1455

Conversation

@dvd233

@dvd233 dvd233 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements item 2 from #1455: long CWD and branch metadata now wraps instead of being clipped on narrow screens.

  • keep the existing single-line metadata behavior on desktop
  • allow flex metadata values to wrap at arbitrary path boundaries below 768px
  • avoid overflow: hidden and ellipsis clipping for the wrapped values
  • extend the existing CSS cascade contract test

Testing

  • go test ./internal/viewer — passed
  • go vet ./internal/viewer — passed
  • go build ./cmd/opencodereview — passed
  • gofmt and git diff --check — passed
  • make check, make test, project ocr review, and browser-width verification were not available in this Windows environment (Make, the ocr binary, and Playwright/browser runtime are not installed)

AI disclosure: Codex (GPT-5) assisted with issue analysis and patch preparation. The complete diff and test results were reviewed before submission.

Fixes #1455

@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 1 issue(s) in this PR.

  • ✅ Successfully posted inline: 1 comment(s)

@media (max-width: 768px) {
.session-page .meta span {
white-space: normal;
flex-wrap: wrap;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maintainability · low
flex-wrap: wrap has no practical effect here. Each .meta span uses display: flex (from the base rule at line 417), but its children are inline elements (<strong>, <code>, text nodes) that don't participate in flex wrapping. The actual text wrapping on narrow screens is already achieved by white-space: normal and overflow-wrap: anywhere. Consider removing this property to avoid confusion for future maintainers.

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@lizhengfeng101
lizhengfeng101 merged commit 57fd9be into alibaba:main Sep 22, 2026
12 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.

fix(viewer): unfinished items from the #1329 responsive/a11y pass

2 participants