Skip to content

Wrap long status blurbs in menu#543

Merged
ratulsarna merged 2 commits intosteipete:mainfrom
zkforge:codex/wrap-status-blurb
Mar 18, 2026
Merged

Wrap long status blurbs in menu#543
ratulsarna merged 2 commits intosteipete:mainfrom
zkforge:codex/wrap-status-blurb

Conversation

@zkforge
Copy link
Copy Markdown
Contributor

@zkforge zkforge commented Mar 16, 2026

Summary

  • Wrap secondary status blurbs in the menu actions section using a view-backed text row so long error messages can wrap instead of widening the menu.
  • Add a StatusMenu test that verifies the status blurb is rendered as a fixed-width custom view.

Verification

  • pnpm check
  • ./Scripts/compile_and_run.sh
  • swift test (hit an existing swiftpm-testing-helper / AppKit SIGSEGV during runner drawing; crash report captured at ~/Library/Logs/DiagnosticReports/swiftpm-testing-helper-2026-03-16-233445.ips)

@zkforge
Copy link
Copy Markdown
Contributor Author

zkforge commented Mar 17, 2026

before
截屏2026-03-17 10 37 16
after
截屏2026-03-17 10 36 55

}

private func makeWrappedSecondaryTextItem(text: String, width: CGFloat) -> NSMenuItem {
let item = NSMenuItem()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this wrapped menu item also preserve the real blurb in item.title? Right now it’s created with NSMenuItem(), which seems to leave the title as NSMenuItem, so it may be worth checking what code paths or accessibility behavior still rely on the menu item’s title rather than the custom view.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. I agree the wrapped item should still preserve the real blurb in item.title, not just in the custom view. I'll update it so we keep the original string on the NSMenuItem and use the view only for wrapping/layout.

@ratulsarna ratulsarna merged commit 724c473 into steipete:main Mar 18, 2026
4 checks passed
@ratulsarna
Copy link
Copy Markdown
Collaborator

Thanks @zkforge !

pablogtzgileta pushed a commit to pablogtzgileta/CodexBar that referenced this pull request Apr 8, 2026
* Wrap long status blurbs in menu

* Preserve wrapped status blurb titles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants