Repository navigation
Native menu bars: submenus, separators, check/radio items, icons, enabled state - #6058
Conversation
…bled state
Commands gain desktop menu paths ("File/Open Recent"), groups and explicit
separators, check items and radio groups. A shared NativeMenuEncoder turns
the published commands into rows every port reads; dispatch toggles state
before the action runs and skips disabled items. Implemented for the JavaSE
simulator, JavaScript desktop chrome, macOS, Catalyst, Windows and Linux
(icons on JavaSE, JS, macOS and Catalyst).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cloudflare Preview
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 206 screenshots: 206 matched. |
|
Compared 170 screenshots: 170 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef884b6336
ℹ️ 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".
|
Compared 12 screenshots: 12 matched. |
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows x64Runner CPU: AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
|
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows arm64Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 185 screenshots: 185 matched. ParparVM vs HotSpot (JDK 25): Linux x64Runner CPU: AMD EPYC 7763 64-Core Processor (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
|
Compared 185 screenshots: 185 matched. ParparVM vs HotSpot (JDK 25): Linux arm64Runner CPU: Neoverse-N2 (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
- Radio groups settle on every published surface (current form and open windows), keeping the most recently checked member; checking a command only clears siblings on surfaces that publish it. - setDesktopRadioGroup(null) makes the command an ordinary item again. - Explicit separators keep their position in a grouped menu. - Display.refreshNativeMenu() republishes open windows too. - JavaSE: icon bytes are part of the menu signature; window menu icons are rendered on the Codename One EDT. - HTML5: submenus are inline details/summary (no clipping, keyboard reachable); cache keys use the unit separator. - Rephrase two developer-guide sentences LanguageTool flagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 737e932b8a
ℹ️ 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".
- PMD: foreach loops, no fully qualified names with an import in place. - Refresh only when the changed command is on a published native menu. - Menu hints are taken literally (no trimming of segments). - Icons honour a command's own icon font. - macOS and Catalyst key submenus by the physical menu, so case variants of a standard hint share them. - Windows and Linux drop a row whose path does not fit instead of placing it under a truncated path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 026b82a94c
ℹ️ 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".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ef14aa2cf
ℹ️ 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".
…every publish Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…fied flag Command.setDesktopRole() marks About, Settings, Quit, Hide, the File and Edit commands, Full Screen, Minimize, Zoom and Help. A new NativeMenuConventions table resolves each role per platform (macOS, Windows, GNOME, browser) to its menu, position, name and shortcut, so the ports only see menu paths: - Settings is in the app menu on macOS, Options under Tools on Windows, Preferences under Edit on Linux. - Quit is Exit on Windows and absent in a browser. Command.createDesktopRole() names a command the platform's way, and setDesktopPlatforms() limits a command to some menu bars. Menus come out in the standard order, and the legacy About/Preferences/Quit hints are read as roles. On macOS and Catalyst a role command takes the place of the stock item. Form/Window.setDocumentModified() shows unsaved changes: documentEdited on macOS, a leading * in the title elsewhere. Save follows that state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEWindowManager.java
Lines 1001 to 1005 in 7a75a80
A secondary JavaSE Window drops new Command(null).setDesktopRole(DESKTOP_ROLE_SAVE) here before NativeMenuEncoder can supply the platform's standard label. The identical command is valid on the main form and encodes as “Save,” so secondary windows silently lose role commands whenever callers use setDesktopRole() directly instead of the convenience factory; pass all non-null commands to the encoder and let it decide which rows are displayable.
ℹ️ 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".
… stock roles Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
In the HTML5 desktop chrome, an application-supplied command icon is attached using its original CSS width and height, and the menu CSS imposes no maximum on the canvas. A valid large icon, such as a 128×128 image also used elsewhere in the UI, therefore expands every menu row and can consume most of the menu panel, unlike the JavaSE and macOS paths that normalize icons to menu size. Scale or CSS-constrain these images to a fixed menu-icon box before attaching them.
ℹ️ 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".
…s a command's document state Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fc58f3801
ℹ️ 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".
…ps, stock separators of moved roles Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0df3343897
ℹ️ 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".
…by action, Catalyst edited title Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f548447dc9
ℹ️ 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".
…chrome keys bypass Bootstrap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Extends the Command-driven native menu bar with:
setDesktopMenu("File/Open Recent")(//is a literal slash; old single-segment hints are unchanged).setDesktopMenuGroup(int)(stable sort, separator on group change) orCommand.createDesktopSeparator(menu).setDesktopChecked) and radio groups (setDesktopRadioGroup); state flips before the action runs.getIcon()/ material icon.Display.refreshNativeMenu();setEnabled/setDesktopCheckedrepublish automatically (coalesced per EDT cycle).A shared
com.codename1.impl.NativeMenuEncoderbuilds the rows all ports consume.Testing
NativeMenuEncoderTest(8) plus related core suites (231) pass.DesktopChromeUITestpasses, including a new JMenuBar structure test.🤖 Generated with Claude Code