Skip to content

Photos: add AI-curated Memories and slideshows - #266

Merged
guofoo merged 3 commits into
mainfrom
feat/photos-ai-memories
Oct 3, 2026
Merged

guofoo merged 3 commits into
mainfrom
feat/photos-ai-memories

Conversation

@guofoo

@guofoo guofoo commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Photos previously offered preset local moments. This adds a Memories browser where users can request AI-curated stories, optionally with a theme such as “summer with family,” then browse the narrative and play an ordered slideshow.

  • Use the existing host-owned model.complete service with bounded sample-catalog metadata and a strict response schema. Provider selection, credentials and budgets stay with the host.
  • Validate photo IDs, preserve saved stories on errors or cancellation, and keep the latest 12 stories in alternating recoverable snapshots. Local moments remain available without AI.
  • Add story details, slideshow controls, thumbnail fallback, app-contract admission checks, executable Splash regressions and a repeatable hidden-shell smoke test. Align the fallback timer with the model service's current request deadline and update both app READMEs.

Validation on the refreshed main base (be0700a):

  • cargo test --locked --offline -p octosense-llm-service: 89 passed, one existing keychain test ignored; includes 14 Photos tests.
  • cargo clippy --locked --offline -p octosense-llm-service --test photos_memories --no-deps -- -D warnings: passed.
  • cargo build --locked --offline -p octosense --no-default-features --features app-hub: passed.
  • python3 apps/photos/tests/ui.py: passed using isolated temporary data and a local mock provider; covers missing-provider guidance, prompted generation through the host service, navigation during generation, saving, slideshow controls and reopening.
  • Setup/pin validation, native-app generation checks, Python compilation and git diff --check: passed.

This first version uses the bundled sample catalog's metadata; device-library import and image-pixel analysis are outside its scope. Live AI providers and physical phones remain unverified.

Storage follow-up validation (433fdff): memory snapshots use the shared data_path helper required by the system-app storage contract. All 31 shell storage tests and 14 Photos tests pass, along with the rebuilt shell and hidden UI save/reopen flow.

Rebased on main a7c746c0 (2026-10-02)

The branch conflicted with 67 newer commits on main. Three files were resolved by hand:

  • apps/photos/bundle/manifest.json: main gave Photos glance and a read-only agent (System apps: every one has its own agent that can notify #274); this branch adds model. The manifest now has ["storage", "glance", "model"] and the agent block.
  • apps/README.md and apps/README.zh-CN.md: main's rows for the other apps are kept. The Photos row combines both versions: Memories, glance and model, plus model.complete and photos.notify. The capability sentence lists news, glance and model.

Two tests needed updating, both because #274 and this branch each changed Photos' manifest (separate commit 249b2cba):

Re-run on the rebased head:

  • cargo test --locked -p octosense-llm-service: 89 passed.
  • cargo clippy --locked -p octosense-llm-service --test photos_memories --no-deps -- -D warnings: passed.
  • cargo build --locked -p octosense --no-default-features --features app-hub: passed.
  • python3 apps/photos/tests/ui.py: PASS. It covers no provider, a prompt, the host completion, navigation during generation, a saved story, the slideshow, and reopening.
  • tools/ci-local.sh --only desktop,phone,apps on 249b2cba (clean tree): PASSED, 33 of 33 steps, none skipped, 13m58s. The first run, before the second test fix, failed only that test.

Rebased on main d31edf46 (2026-10-03), after #302

Two rounds of conflicts, all in apps/README.md and apps/README.zh-CN.md:

apps/photos/bundle/main.splash combines #302's Home preview and this branch's Memories without conflict, and is identical to a plain merge of the two. The branch's diff against main is still 10 files.

Re-run on a5f1a6e1:

  • tools/ci-local.sh --only desktop,phone,apps (clean tree): PASSED, 33 of 33 steps, none skipped. It includes fix(photos): adaptive full-height Home previews #302's resize tests. The first run failed one ai-host test that this branch does not touch: a race in main's own tests, reported separately. The rerun passed.
  • cargo test --locked -p octosense-llm-service: 91 passed.
  • cargo clippy --locked -p octosense-llm-service --test photos_memories --no-deps -- -D warnings: passed.
  • python3 apps/photos/tests/ui.py: PASS.

@guofoo
guofoo marked this pull request as ready for review October 2, 2026 03:08
@guofoo
guofoo force-pushed the feat/photos-ai-memories branch 3 times, most recently from 249b2cb to 2581bd7 Compare October 3, 2026 07:52
guofoo and others added 3 commits October 3, 2026 01:04
main gave every system app its own agent for its notices (#274,
0212ff7). With this branch's `model` for Memories on top, two tests
written on either side no longer held:

- photos_bundle_is_admitted_by_the_shared_app_contract asserted that
  Photos has no agent; it now checks that the agent stays read-only.
  Memories are still one-shot model.complete calls.
- photos_maps_youtube_and_camera_offer_notify_from_their_bundles
  expected Photos' grants to be storage and glance; they are now
  storage, model and glance.
@guofoo
guofoo force-pushed the feat/photos-ai-memories branch from 2581bd7 to a5f1a6e Compare October 3, 2026 08:27
@guofoo
guofoo merged commit a309848 into main Oct 3, 2026
5 checks passed
@guofoo
guofoo deleted the feat/photos-ai-memories branch October 5, 2026 20:01
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