Skip to content

feat(photos): add adaptive folder navigation - #245

Merged
veryCrunchy merged 7 commits into
mainfrom
feat/photos-folder-browse-state
Jul 28, 2026
Merged

feat(photos): add adaptive folder navigation#245
veryCrunchy merged 7 commits into
mainfrom
feat/photos-folder-browse-state

Conversation

@veryCrunchy

@veryCrunchy veryCrunchy commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the Photos pill row with adaptive bottom, rail, and desktop sidebar navigation
  • add a native Folders destination with durable folder/back context, path search, and explicit direct or recursive scopes
  • page the server inventory incrementally with bounded memory, partial publications, exact-cursor retry, and explicit incomplete/stale states
  • add remembered grid and list presentations without duplicating overlapping nested media
  • keep RAW/JPEG siblings as one navigable item while retaining bounded source members for the high-detail viewer
  • load backup state for visible folder media rather than blocking the complete inventory
  • capture the real Compose folder browser with deterministic synthetic data on compact mobile and expanded desktop layouts

User impact

Photos now has stable top-level destinations and a folder browser that scales from phones to desktop. People can search folder paths, choose whether nested media is included, move back through folder context before leaving Photos, and switch between grid and list views. Large libraries publish usable partial folder results while paging continues, and safety stops are visible instead of silently presenting an incomplete library as complete.

This advances rather than closes #243. Media-metadata search, representative folder thumbnails, additional sort controls, renamed/moved/deleted-folder recovery, exhaustive recursion-mode visual coverage, and final emulator interaction acceptance remain tracked there.

Advances #243

Validation

  • :ui:desktopTest --tests '*PhotoFolderInventoryPagingTest' --tests '*PhotoFolderBrowsingTest' --tests '*MediaStackingTest' --tests '*MediaViewerNavigationTest' --tests '*MarketingPhotoFolderCaptureScenarioTest'
  • :androidApp:compileDebugKotlin
  • :ui:captureMarketingScreenshots captured 24 real Compose scenarios without a device
  • npm run --prefix website verify:captures:fresh verified all 24 synthetic captures against the exact source tree
  • bash tools/check-repository.sh
  • git diff --check
  • visual inspection of photo-folder-browser-mobile.png and photo-folder-browser-desktop.png

@veryCrunchy veryCrunchy added area:photos Photos, Memories, RAW, people, albums, tags, and editing area:ux Navigation, accessibility, responsive design, and interaction in-progress Implementation is currently active needs-design Requires interaction or visual design before completion platform:android Android-specific implementation or validation platform:desktop Desktop-specific implementation or validation priority:P1 Required for the pre-release product experience type:feature New product capability labels Jul 27, 2026 — with ChatGPT Codex Connector
@veryCrunchy veryCrunchy added this to the 0.6 Platform polish milestone Jul 27, 2026
@veryCrunchy
veryCrunchy marked this pull request as ready for review July 27, 2026 20:44

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb9b73ae00

ℹ️ 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".

Comment thread ui/src/commonMain/kotlin/dev/obiente/nextcloudnative/app/NextcloudNativeApp.kt Outdated
Comment thread ui/src/commonMain/kotlin/dev/obiente/nextcloudnative/app/PhotoFolderBrowser.kt Outdated
Comment thread ui/src/commonMain/kotlin/dev/obiente/nextcloudnative/app/PhotoFolderBrowser.kt Outdated
Comment thread ui/src/commonMain/kotlin/dev/obiente/nextcloudnative/app/PhotoFolderBrowsing.kt Outdated
Comment thread ui/src/commonMain/kotlin/dev/obiente/nextcloudnative/app/PhotoFolderBrowser.kt Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f72c67059c

ℹ️ 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".

Comment thread ui/src/commonMain/kotlin/dev/obiente/nextcloudnative/app/NextcloudNativeApp.kt Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1fa8474e2

ℹ️ 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".

Comment thread ui/src/commonMain/kotlin/dev/obiente/nextcloudnative/app/NextcloudNativeApp.kt Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 456720e6f1

ℹ️ 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".

Comment on lines +124 to +125
if (state.complete || state.truncationReason != null || state.safetyStopReason != null) {
return state

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Revalidate a completed folder inventory

When the user revisits Folders after server media has been uploaded, moved, or deleted, MediaScreen invokes the same session-scoped pager, but this guard returns before loadPage; the pager generation remains fixed and no other path rebuilds its repository, so stale folders and counts persist until the session is recreated. Fresh evidence relative to the earlier stale-snapshot concern is this terminal complete path; start a new inventory generation while retaining the existing publication during revalidation.

AGENTS.md reference: AGENTS.md:L207-L208

Useful? React with 👍 / 👎.

Comment on lines +417 to +418
.take(maximumSelectionRecords)
.toList()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Page the selected-folder media window

When a folder or recursive scope contains more than 2,000 media records, this silently retains only the first maximumSelectionRecords; the summary still reports the complete count, but the grid, list, and viewer expose no continuation mechanism for the remaining items. Fresh evidence after the inventory-paging change is this separate bounded selection window, so make it pageable or clearly expose the partial state and a way to continue loading.

AGENTS.md reference: AGENTS.md:L240-L242

Useful? React with 👍 / 👎.

refreshError: String?,
): PhotoFolderInventoryReadiness = when {
hasInventory && refreshError != null -> PhotoFolderInventoryReadiness.Stale
hasInventory -> PhotoFolderInventoryReadiness.Ready

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mark in-progress inventory publications as partial

When an account requires multiple timeline pages, the pager publishes after each accepted page with loading still true, but this branch classifies any publication without an error as Ready. The folder browser therefore presents interim folders and counts as complete, potentially for many network requests, with no indexing indicator; include loading/completion in readiness and explain that the visible inventory is still expanding.

AGENTS.md reference: AGENTS.md:L240-L242

Useful? React with 👍 / 👎.

photoFolderState.scope,
) {
folderPagingState.publication?.let {
folderInventoryState.pager.selectionSnapshot(photoFolderState)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Move inventory snapshot construction off the UI thread

When the account index is large, every page publication and every folder, query, or scope change executes selectionSnapshot synchronously inside this composition-time remember. That call can scan all 50,000 retained records and rebuild the complete folder summary before Compose can render the next frame, so navigating folders or typing a search can visibly stall Android and desktop UI; construct and publish the immutable snapshot from a background dispatcher instead.

Useful? React with 👍 / 👎.

@veryCrunchy
veryCrunchy merged commit 8471288 into main Jul 28, 2026
2 checks passed
@veryCrunchy
veryCrunchy deleted the feat/photos-folder-browse-state branch July 28, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:photos Photos, Memories, RAW, people, albums, tags, and editing area:ux Navigation, accessibility, responsive design, and interaction in-progress Implementation is currently active needs-design Requires interaction or visual design before completion platform:android Android-specific implementation or validation platform:desktop Desktop-specific implementation or validation priority:P1 Required for the pre-release product experience type:feature New product capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(photos): add folder-aware browsing, search, and view modes

1 participant