Repository navigation
Native open/save file dialogs with platform hints, options and preview - #6052
shai-almog wants to merge 17 commits into
Conversation
… previews Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…download Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d options Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open uses initForOpeningContentTypes (filter UTTypes, extensions, folder), multi-select, directoryURL and shouldShowFileExtensions; picked items are copied to tmp. Save stages content in the caches dir off the EDT and exports it with initForExportingURLs asCopy. Results return through a per-request id and are delivered on the EDT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…filters, options and hints Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Filters become an accessory popup that switches the allowed types, options render as checkbox/popup/text controls in the same accessory stack, and the MAC_* hints map to the panel properties. Answers use NativeFileDialogCodec; saves are written through completeSaveDialog. No accessory Component or preview on the Mac yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Compared 12 screenshots: 12 matched. |
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
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. |
|
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: 71c2a5a6ee
ℹ️ 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 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
|
- Copyright headers on the new tests; classify the fallback save form in FrameworkChromeNeverWindowsTest; Vale quote punctuation in the guide. - Linux: add the filter's extension in the GTK native and confirm the overwrite of that name, since GTK only checked the typed basename. - Core: saving a sourceFile onto itself no longer truncates it. - Android: refuse to launch while another activity result is outstanding; stop reporting INITIAL_DIRECTORY, which only the URI hint honours. - iOS: convert extension filters to legacy UTIs before iOS 14; copy picked documents off the main thread. - JavaScript: report a dismissed picker as cancelled; a save too large for the heap still answers the callback. - Linux/Windows: deliver results on the EDT. 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: c6b20e3220
ℹ️ 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 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows x64Runner CPU: AMD64 Family 25 Model 17 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 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
- Core: a content writer still runs when the destination is the source file; the default implementation no longer advertises INITIAL_DIRECTORY. - JavaSE: filtered saves (and filtered opens on Windows, where AWT's FilenameFilter does nothing) use the Swing chooser, which confirms the overwrite of the name with the extension added. - Android: picks are checked against extension filters the MIME query could not express; a picked folder is copied to the cache so the result is a path FileSystemStorage can use. - macOS: filters given as UTIs reach allowedFileTypes. - iOS: close the staged export stream in a finally (SpotBugs DLS). 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: 7879337058
ℹ️ 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".
- Windows: an IFileDialogEvents sink keeps the save dialog's default extension on the selected filter, so switching type no longer yields report.pdf.png. - Core: the fallback save form runs on the EDT when called from another thread, and the open fallback delivers on the EDT. - JavaSE: drop a preview render that finishes after the selection moved; parse file:/ and drive-letter URLs for the starting folder; saves that must not confirm an overwrite use the Swing chooser. - iOS: watchOS and tvOS use the Codename One fallback; a picker requested while another controller is presented answers cancelled instead of hanging. 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: 02eb1bc9c1
ℹ️ 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".
- Windows: the events sink sets the default share-violation and overwrite responses instead of leaving them indeterminate. - Core: drop the WEB_ID and WEB_START_IN hints; the browser port uses a download and a file input, neither of which reads them. - iOS: escape '%' and newline in picker paths before joining them, and unescape in fileDialogResult. - Android: siblings with the same display name in a copied folder get distinct local names. 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: 9f1f2aeb58
ℹ️ 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".
- macOS: escape '%' and the record separator in every result field, since a Mac file name may contain the separator; macFileDialogResult unescapes. - JavaSE: requests with a custom accept label use the Swing chooser, the only one that can set the button text. - iOS: an import whose copy fails reports an error instead of silently dropping the item or reading as a cancellation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 15% (time) / 15% (RAM) away from 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 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
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 1 performance regression:
1 improvement past the baseline, which fails until rebaselined:
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 15% (time) / 15% (RAM) away from its baseline in
A change that moves performance ON PURPOSE records the new baseline in Result: performance regression |
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 168 screenshots: 168 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
|
@codex review |
|
Compared 167 screenshots: 167 matched. Benchmark Results
Detailed Performance Metrics
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfa84c5a67
ℹ️ 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".
| } else if (acceptedByFilters(request.getFilters(), resolver, u)) { | ||
| paths.add(copyToCache(resolver, u)); |
There was a problem hiding this comment.
Reject the entire mixed Android selection
When an extension cannot be mapped to a MIME type, the intent is deliberately widened to */*; with multi-select, a user can therefore choose both matching and nonmatching files. This branch silently omits each rejected URI but reports success whenever at least one URI passed, so callers receive an incomplete selection without an error. Fail the whole selection or explicitly report the rejected items instead of returning only the accepted subset.
Useful? React with 👍 / 👎.
Adds native save dialogs, plus open dialogs you can customize, in the new package
com.codename1.io.filechooser.API
Display.showOpenDialog(OpenFileRequest, cb)andDisplay.showSaveDialog(SaveFileRequest, cb). The callback runs on the EDT, including when the user cancels.FileTypeFilter: extensions, MIME types, UTTypes), a suggested name, multi-select or folder picking, and overwrite confirmation.FileDialogOptions (checkbox, choice, text) show up inside the native dialog where the platform allows it, and their values come back inFileDialogResult.FileDialogHintsare platform hints (macOS tag field, Windows client GUID, Android initial URI, ...). A platform ignores the hints it doesn't know.FilePreviewProvidergives a live preview while opening. An accessoryComponentcan be added too.SaveContent(written after the user picks a location and format) or from an existing file.Display.isFileDialogFeatureSupported(...)is a runtime capability query.openFileChooseris unchanged.Ports
FileDialog, or SwingJFileChooserACTION_CREATE_DOCUMENTUIDocumentPickerNSOpenPanelNSSavePanelIFileOpenDialogIFileSaveDialogIFileDialogCustomize, hintsGtkFileChooserGtkFileChooserKnown limitations
allowedFileTypes, which is deprecated on macOS 12 and later, and always confirms before overwriting.Verification
FileDialogRequestTestandFileDialogSupportTest.🤖 Generated with Claude Code