Skip to content

Restore the board-subfolder and Cluster Strength fixes #382 reverted - #383

Merged
lstein merged 1 commit into
masterfrom
lstein/fix/restore-reverted-invokeai-and-eps
Aug 22, 2026
Merged

Restore the board-subfolder and Cluster Strength fixes #382 reverted#383
lstein merged 1 commit into
masterfrom
lstein/fix/restore-reverted-invokeai-and-eps

Conversation

@lstein

@lstein lstein commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Indexing an InvokeAI board album skipped almost everything — "386 of 387 file(s) listed by InvokeAI were not found on disk and were skipped" against a backend at localhost:9090 with a correct InvokeAI root.

The resolution code had not been changed. It had been deleted.

What happened

PR #382 (the iPad fullscreen-panel fix) carried stale copies of files it never meant to touch, and squash-merging it rolled two already-merged PRs back to their exact pre-merge state:

Reverted PR Files taken back
#378 — Resolve InvokeAI board media through their recorded subfolder photomap/backend/invokeai_client.py, photomap/backend/routers/index.py, tests/backend/test_invokeai_client.py, tests/backend/test_invokeai_board_index.py
#376 — Pausing mid-edit no longer discards the Cluster Strength photomap/frontend/static/javascript/umap.js, photomap/frontend/static/css/umap-floating-window.css, tests/backend/test_cluster_eps.py, tests/frontend/umap-eps-debounce.test.js (deleted outright), tests/frontend/umap-reindex-refresh.test.js

Every one of those files was byte-identical to its pre-merge content on master, tests included — which is why nothing failed. The tests that would have caught it went back with the code they covered.

The user-visible symptom is #378's: board albums went back to joining the bare filename to <invokeai_root>/outputs/{images,videos}, so on a backend whose subfolder strategy is not flat, almost nothing resolves. #376's loss is silent until someone pauses mid-edit over the Cluster Strength spinner.

What this does

Restores both commits verbatim — cherry-picked onto current master, no conflicts. #377's asyncio.to_thread hunk in index.py, which landed after the revert in an untouched region, is preserved.

No new logic: every line here has already been reviewed and merged once.

Verification

Live against the reporter's InvokeAI at localhost:9090, the same album that failed:

resolved: 386  missing: 1  video_api: True
videos: 296  images: 90
  /home/lstein/invokeai-main/outputs/images/user/d3d43dd3-….png
  /home/lstein/invokeai-main/outputs/videos/general/610600c3-….mp4

The inverse of the reported failure. The one remaining miss is a genuine gap rather than a resolution bug — InvokeAI lists a video whose subfolder resolves correctly and whose directory exists, but the file is not on disk.

Backend 844 passed, frontend 656 passed (633 before this PR, the difference being umap-eps-debounce.test.js coming back), ruff clean. Confirmed working in the app by the reporter.

Checked the seam between the restored #376 and #375, which was authored against the already-reverted tree: both floor the Cluster Strength at MIN_CLUSTER_EPS (0.01, the spinner's own min), so they agree.

Worth doing separately

Any branch opened before 2026-08-20 can carry the same staleness. This loop reports files a later commit took back to their pre-merge state:

for c in $(git log --format=%h -15); do
  for f in $(git show --name-only --format="" $c); do
    git cat-file -e $c^:"$f" 2>/dev/null &&
      git diff --quiet $c^ HEAD -- "$f" && echo "$c LOST: $f"
  done
done

(It misses files a commit created; a drop in the test count between PRs is the other tell.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01KtGdMfK3k6z2tazjDjMFtE

PR #382 (the iPad fullscreen-panel fix) carried stale copies of files it
never meant to touch, and squash-merging it rolled two already-merged PRs
all the way back to their pre-merge state:

  #378  Resolve InvokeAI board media through their recorded subfolder
        photomap/backend/invokeai_client.py
        photomap/backend/routers/index.py
        tests/backend/test_invokeai_client.py
        tests/backend/test_invokeai_board_index.py

  #376  Pausing mid-edit no longer discards the Cluster Strength
        photomap/frontend/static/javascript/umap.js
        photomap/frontend/static/css/umap-floating-window.css
        tests/backend/test_cluster_eps.py
        tests/frontend/umap-eps-debounce.test.js  (deleted outright)
        tests/frontend/umap-reindex-refresh.test.js

Every one of those files was byte-identical to its pre-merge content on
master, tests included, which is why nothing failed: the tests that would
have caught it went back with the code they covered.

The user-visible symptom is #378's: board albums went back to joining the
bare filename to <invokeai_root>/outputs/{images,videos}, so on a backend
whose subfolder strategy is not `flat` almost nothing resolved — indexing
the reporter's board skipped 386 of 387 files.

This restores both commits verbatim (cherry-picked, no conflicts) on top
of current master. #377's `asyncio.to_thread` hunk in index.py, which
landed after the revert in an untouched region, is preserved.

Verified live against the reporter's InvokeAI at localhost:9090: the same
album now resolves 386 of 387 files, the inverse of the reported failure.
The one remaining miss is a genuine gap — InvokeAI lists a video whose
subfolder resolves correctly and whose directory exists, but the file
itself is not on disk.

Backend 844 passed, frontend 656 passed (633 before, the difference being
umap-eps-debounce.test.js coming back), ruff clean. Checked the seam
between restored #376 and #375, which was authored against the reverted
tree: both floor the Cluster Strength at MIN_CLUSTER_EPS (0.01, the
spinner's own `min`), so they agree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KtGdMfK3k6z2tazjDjMFtE
@lstein
lstein enabled auto-merge (squash) August 22, 2026 15:31
@lstein
lstein merged commit 325a403 into master Aug 22, 2026
10 checks passed
@lstein
lstein deleted the lstein/fix/restore-reverted-invokeai-and-eps branch August 22, 2026 15:36
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