Repository navigation
feat(compose): list the camera folder in the image picker - #206
Merged
Merged
Conversation
The picker on a new post listed only Cobalt's own images folder. It now
also lists the console's camera folder, sd:/DCIM, with photos one folder
down (DCIM/<folder>/<image>), read with Wolfram's
wf_attach_scan_images_tree. Each row says where it came from ("Images:"
or "Camera:"), and each row opens from its own folder. The app folder
is listed first, as before.
The rows now hold a name of up to 128 bytes (a camera row is
"folder/name") and up to 64 rows, about 8 KB. Each row stores only its
source index, not a full path, so the path is built from the folder for
that source when the image is chosen.
Needs Wolfram v0.39.0; the pin stays at v0.38.1 until it is released.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
The image picker on a new post (and a quote) listed only Cobalt's own
imagesfolder. It now also lists the console's camera folder,sd:/DCIM, with photos one folder down (DCIM/<folder>/<image>), read with Wolfram'swf_attach_scan_images_tree. This is the Wii U counterpart of the 3DS camera folder.Images:orCamera:, and a camera row showsfolder/name.DCIMfolder, the picker lists only the app's images, as before. The empty-state message now names both folders.src/app/compose.c:cobalt_picker_join,cobalt_picker_row_dirandcobalt_picker_row_source.cobalt_sd_pathinsrc/util/paths.cresolvesDCIMon the SD card root.cobalt_compose_open_pickernow takes the camera folder as a third argument (NULL for none).docs/guide.mdandCHANGELOG.mdupdated.Dependency: Wolfram v0.39.0.
wf_attach_scan_images_treeis in Wolfram PR ewanc26/wolfram#193, not released yet. This PR must not merge until Wolfram v0.39.0 is released and the Cobalt pin moves to it. The pin stays at v0.38.1 in this PR, so a build against v0.38.1 will not link. Verified against the Wolfram feature branch, not the pinned release.Known limitation: the app's images are listed first and the camera folder fills the rows left over, so with 64 or more app images the camera folder shows nothing.
Verification
Host, on macOS (no hardware, no emulator):
cd tests && make check: 1036 checks, 0 failures. Includes the existing image-attach test and a newpicker pathstest (test_picker_paths): path joining, a row's source and folder, and a mixed app and camera scan with the expected order.make sweep linkcheck: sweep ok (47 files, with and without Wolfram); linkcheck ok against the Wolfram feature branch, rebuilt withWOLFRAM_BUILD_TESTS=ON. Wolfram was restored tomainafterwards.DCIMpath on a real console and the picker's layout on screen are unverified.Docs
docs/guide.md: the attach sentence now names both folders.CHANGELOG.md: an Added entry under[Unreleased].README.mdanddocs/PARITY.mdneed no change.Changelog: CHANGELOG.md
Checklist
CI gateandflow / conventions)Do not merge until Wolfram v0.39.0 is released and the Cobalt pin is moved to it.
🤖 Generated with Claude Code