Skip to content

feat(assets): make the shared explorer confirm transactionally - #208

Merged
IAnMove merged 3 commits into
developmentfrom
feat/asset-picker-modal
Sep 7, 2026
Merged

feat(assets): make the shared explorer confirm transactionally#208
IAnMove merged 3 commits into
developmentfrom
feat/asset-picker-modal

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Evolve AssetExplorerDialog to the PR 2 contract while keeping the ApiOutput wrapper for feat(video3d): add a real 3D stage beside the 2.5D compositor #198 consumers (SceneAnimatorExplorer, SceneRecipePanel, Scene3DWorkspace).
  • No first-card preselection; no double-click confirm. Choose / Cancel are the only commit/abort paths. None is explicit clear.
  • Sort (created_desc|created_asc|name_asc|name_desc) and search apply to the full list before paging (24 cards).
  • Provisional choice survives item-list refresh and filters; incompatible kinds cannot be confirmed.
  • Dates use created_at (unknown date if missing), never completed_at. EN/ES catalog keys for sort/filter/empty/error.
  • Base: origin/development f1855ab7 (feat(assets): add picker contract, adapters, and catalog sort #207 mixed). Does not add RAM-heavy previews (PR 3) or dual-origin field (PR 4). Do not merge until asked.

Test plan

  • assetExplorerDialog.test.tsx + assetPickerContract.test.ts — 17 passed
  • npm run i18n:check, eslint on touched UI files, tsc -b
  • scripts/verify_clean_repo.py
  • Full UI suite / e2e / GPU / generation: not run here (CI covers UI + e2e)
  • Cursor review: not run (quota)

Coste de la tarea

  • Tests simulados: 0 tokens externos
  • Tests reales: N/A
  • Llamadas LLM externas: 0
  • Tokens de prompt: N/A
  • Tokens de respuesta: N/A
  • Tokens totales: N/A
  • Generaciones de imágenes/audio/vídeo: 0
  • Tiempo transcurrido: N/A
  • Proveedores/modelos: N/A

Note

Medium Risk
Shared explorer used across 2.5D/3D compositor flows changes confirm semantics and selection rules; regressions would affect asset assignment but the public ApiOutput callback shape is preserved.

Overview
AssetExplorerDialog is updated to the asset-picker PR 2 modal contract while still calling onChoose with ApiOutput for existing #198 consumers.

Selection is transactional: cards only set a provisional pick; Choose commits and Cancel / overlay close abort without mutating the field. Double-click no longer confirms, the first item is not preselected, and None (when allowNone) explicitly clears. Choose stays disabled until a compatible, in-catalog selection exists.

The body now maps outputs through outputToPickerItem, with shared filterPickerItems / sortPickerItems / paginatePickerItems (localQuery.ts, page size 24), toolbar sort and kind filters, optional constraints + checkCompatibility, and loading / error + retry props. Preview/metadata use picker titles and created_at (not completed_at). EN/ES explorer strings were added; dev docs mark #207 merged and PR 2 in flight. Tests cover the new UX and client sort/filter behavior.

Reviewed by Cursor Bugbot for commit 5be6ce1. Configure here.

Stop preselecting the first card and confirming on double-click.
Sort and filter the full list before paging, keep a provisional
choice when items refresh, and treat None as clear rather than Cancel.
@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b377d6a3-b88e-4823-a8b9-fae4def9c91f)

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 11 file(s); +574/-121; React UI, docs

Automated review from scripts/analyze_pr.py. This is a heuristic pass (no LLM) so humans still own the merge decision.

Findings

  • low — UI changed — rebuild before merge
    Run cd ui && npm run build (CI already does this). Pinokio Update rebuilds for end users; keep ui/dist untracked.

Changed files

  • added: ui/src/components/common/AssetExplorerChrome.tsx, ui/src/features/asset-picker/localQuery.ts
  • modified: docs/development/ASSET_PICKER_MIGRATION.md, docs/development/CURRENT_WORK.md, ui/src/components/common/AssetExplorerDialog.tsx, ui/src/components/common/assetExplorer.ts, ui/src/features/asset-picker/index.ts, ui/src/i18n/locales/en/common.json, ui/src/i18n/locales/es/common.json, ui/tests/assetExplorerDialog.test.tsx, ui/tests/assetPickerContract.test.ts

CONTRIBUTING checklist

  • python scripts/verify_clean_repo.py
  • python -m compileall -q app/services app/launch.py scripts
  • cd ui && npm run build if the UI changed
  • No weights, CivitAI sidecars, or generated guides
  • Stays local-first (no required accounts / telemetry)

Posted by the repo PR review workflow. Re-runs on each push to the PR.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Code health

Quality score: 53.9/100

Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.

Component Weight Current Change
Cyclomatic health 45% 54.2 +0.0
File concentration 25% 60.5 +0.1
Oversized-file debt 20% 36.0 +0.1
Modularity 10% 72.0 +0.1

Change vs PR base: +0.0 points.

Metric Value
Production LOC 260,831
Production files 659
Test LOC 89,688
Functions measured 16,700
Functions complexity ≥ 15 821
Maximum complexity 670
Policy code-health-policy-v1
HEAD 17910709252f58478cb5ddc2517c9a0049923f5f
Base f1855ab753bab019e000934f4647522e0aa9900d
UI measurement complete

Markdown, JSON catalogs and tests are out of this table. Only app/ runtime + ui/src TS/JS count.

Most complex functions

Complexity Where
670 app/wgp.py:7164 generate_video
376 ui/src/stores/useStore.ts:4029 Async method 'startGeneration'
355 app/_launch_runtime.py:23505 _run_generation
308 app/wgp.py:12298 generate_video_tab
271 ui/src/stores/useStore.ts:8572 Async method 'loadSettingsFromOutput'
258 app/services/director/planners/short_film.py:3433 ShortFilmPlanner._plan_story_driven
257 ui/src/components/Sidebar/SceneAnimatorPanel.tsx:478 Function 'SceneAnimatorPanel'
248 app/services/director_pipeline.py:13607 _run_video_generation
245 app/services/director_pipeline.py:7712 _run_pipeline
244 ui/src/features/agent/agentActions.ts:1145 Function 'parseAction'
226 app/services/director_pipeline.py:6541 update_comic_preview
225 ui/src/features/agent/agentActions.ts:2892 Async function 'executeAgentActions'

Trend vs baseline

Metric Δ
Production LOC +278
Test LOC +150
Functions ≥ 15 +0
Maximum complexity +0

Warnings

  • production LOC increased by +278

Ratchet passed.

AssetExplorerBody was a new hotspot at 27 (limit 25). Move toolbar,
gallery, preview and footer into smaller components.
@IAnMove
IAnMove merged commit 059282e into development Sep 7, 2026
10 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