Skip to content

feat(compose): list the camera folder in the image picker - #206

Merged
ewanc26 merged 3 commits into
mainfrom
feat/camera-folder-picker
Oct 7, 2026
Merged

ewanc26 merged 3 commits into
mainfrom
feat/camera-folder-picker

Conversation

@ewanc26

@ewanc26 ewanc26 commented Oct 7, 2026

Copy link
Copy Markdown
Owner

What this changes

The image picker on a new post (and a quote) 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. This is the Wii U counterpart of the 3DS camera folder.

  • Rows: the app's images first (unchanged), then the camera folder's, each sorted by name. Each row is labelled Images: or Camera:, and a camera row shows folder/name.
  • Each row opens from its own folder. A row stores only its source index, not a full path, so the picker holds 64 rows of 128-byte names (about 8 KB) instead of a path per row.
  • With no SD card, or no DCIM folder, the picker lists only the app's images, as before. The empty-state message now names both folders.
  • New helpers in src/app/compose.c: cobalt_picker_join, cobalt_picker_row_dir and cobalt_picker_row_source. cobalt_sd_path in src/util/paths.c resolves DCIM on the SD card root.
  • cobalt_compose_open_picker now takes the camera folder as a third argument (NULL for none).
  • docs/guide.md and CHANGELOG.md updated.

Dependency: Wolfram v0.39.0. wf_attach_scan_images_tree is 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 new picker paths test (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 with WOLFRAM_BUILD_TESTS=ON. Wolfram was restored to main afterwards.
  • Not run: the Wii U build, Cemu, and real hardware. The DCIM path 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.md and docs/PARITY.md need no change.

Changelog: CHANGELOG.md

Checklist

  • CI is green (CI gate and flow / conventions)
  • No secrets, tokens or signing keys in the diff
  • Tests added or changed with the behaviour; none skipped, disabled or deleted

Do not merge until Wolfram v0.39.0 is released and the Cobalt pin is moved to it.

🤖 Generated with Claude Code

ewanc26 and others added 3 commits October 8, 2026 00:24
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>
@ewanc26
ewanc26 merged commit 04d362f into main Oct 7, 2026
12 checks passed
@ewanc26
ewanc26 deleted the feat/camera-folder-picker branch October 7, 2026 23:45
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.

1 participant