Skip to content

Pendant app shell: folder access probe and docs - #12

Merged
VirtualMachinist merged 5 commits into
mainfrom
feat/pendant-shell-d1
Nov 14, 2026
Merged

VirtualMachinist merged 5 commits into
mainfrom
feat/pendant-shell-d1

Conversation

@VirtualMachinist

Copy link
Copy Markdown
Member

Summary

Pendant app shell, folder access probe and docs (pack 2a, G3). The probe records what folder access each phone platform gives, to inform the notes-vault decision. It has no Lapis link.

  • Probe: app/src/platform/folders.rs, folders_ios.rs, folders_android.rs, d1.rs.
    • iOS uses the document picker with security-scoped access and a bookmark.
    • Android uses the tree picker with a persisted URI permission. Its callback is Java source in app/android/PendantFolders.java, compiled to dex by build.rs only for Android.
    • The probe counts .md files at the top level and recursively.
    • It reports whether a POSIX path was available and whether access survives a restart.
  • Fixture: app/tools/d1-fixture.sh writes a made-up folder of 25 top-level .md files, 3 other files and a nested folder with 5 more .md files.
  • iOS fix: the data directory is resolved before the picker opens, because resolving it on the UIKit main thread panicked.
  • Docs:
    • The README gains a "Phone app (built on a Mac)" build section, including the Android biometric-permission step.
    • THIRD_PARTY_NOTICES.md lists nsh 0.5.0 under Apache-2.0 with its license text.
  • Lock: the root Cargo.lock gains the one missing tracing-subscriber entry for the bridge test dependency, so cargo test --workspace --locked passes.

Not changed

  • No Lapis dependency or note screens in the app.
  • No direct tokio or reqwest, and no tokio in app/src.

Test plan

  • CI: check (workspace and app cargo deny), banned-names, cargo-deny
  • App fmt, clippy with warnings denied on host, sim, device iOS and Android, and tests on the build host
  • cargo test --workspace --locked
  • Sim and emulator: picking the fixture reports 25 top-level and 30 total .md files, and access is restored after a relaunch

🤖 Generated with Claude Code

VirtualMachinist and others added 5 commits November 14, 2026 13:04
The probe's shape for G3, parked while the G2 runs finish:

- platform/folders.rs: FolderReport, a host-tested counter for the
  fixture (25 top-level .md, 30 in all, 3 other files, one folder), and
  pick() / remembered() per platform.
- folders_ios.rs: UIDocumentPickerViewController for a folder, counted
  inside the URL's security scope through its POSIX path, with a
  bookmark kept for after a restart.
- folders_android.rs and android/PendantFolders.java: the tree picker
  through a headless Fragment, a persisted read permission, and a count
  through DocumentsContract (a content:// tree has no POSIX path).
- keystore.rs: one embedded-dex class loader shared by both Java classes;
  build.rs compiles every Java file under android/ (Android only).

Not yet mounted in lib.rs, and the iOS UIKit dependencies are not added,
so it does not build yet. No Lapis link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the merged G2 shell into the D1 branch.
- A D1 probe page (platform/d1.rs), reached by pendant://d1 or
  PENDANT_START=d1: Pick a folder runs the phone's own folder picker and
  shows what the app can count; on open, and on Check kept access, it
  reports the access kept from an earlier pick, which after a restart is
  the persistence check. Each result is also a "d1:" trace line.
- folders is mounted for every target; the host keeps its stub.
- iOS: objc2-ui-kit and uniform-type-identifiers for the picker; the
  off-thread wait helper is crate-visible for it.
- tools/d1-fixture.sh writes the made-up fixture: 25 top-level notes,
  3 other files, one nested folder with 5 notes, one hidden note.

No Lapis link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- folders_ios: the bookmark file is resolved before the picker opens.
  The delegate runs on UIKit's main thread, where nsh's data_dir panics,
  and the first pick aborted the app.
- README: a "Phone app" section covering the toolchain, build,
  the Android USE_BIOMETRIC step, install, pairing, and the D1 probe.
- THIRD_PARTY_NOTICES.md: nsh 0.5.0 under Apache-2.0, with its license
  text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bridge gained a tracing-subscriber dev-dependency without the root
lock being written, so cargo test --workspace --locked refused to run.
Regenerated without upgrading anything: the only change is that one
dependency line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@VirtualMachinist
VirtualMachinist merged commit 92cb446 into main Nov 14, 2026
3 checks passed
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