Skip to content

feat(master-ui): replace list Compact with Optimize (merge+compact+index)#153

Merged
beinan merged 4 commits into
mainfrom
worktree-ui-optimization
Jul 16, 2026
Merged

feat(master-ui): replace list Compact with Optimize (merge+compact+index)#153
beinan merged 4 commits into
mainfrom
worktree-ui-optimization

Conversation

@beinan

@beinan beinan commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The experiment list's per-row Compact button becomes Optimize, which enqueues the full maintenance sequence for that experiment in order: merge_walcompactindex_id
  • All three go through the unified task queue (compact now enqueues a task instead of hitting the legacy /compact bridge), so progress is visible in one place; clicking switches to the queue view
  • The detail drawer keeps its three individual buttons (Compact / Merge WAL / Index id) unchanged

Test plan

  • npm run build (tsc + vite) passes
  • Manual: in the experiment list, click Optimize on a row → queue view shows three tasks (merge_wal, compact, index_id) queued → running → done in order
  • Manual: open an experiment's detail drawer → the three individual buttons still work independently

🤖 Generated with Claude Code

beinan and others added 2 commits July 16, 2026 00:21
…dex)

The experiment list's per-row Compact button becomes Optimize, which enqueues
the full maintenance sequence for that experiment in order: merge_wal →
compact → index_id. All three go through the unified task queue (compact now
enqueues a task rather than hitting the legacy /compact bridge), so progress
is visible in one place and the view switches to the queue on click.

The detail drawer keeps its three individual buttons (Compact / Merge WAL /
Index id) unchanged.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
The Optimize button enqueues merge_wal, compact, and index_id for one
experiment. compact and index_id share a per-experiment base-table write
gate (CreateIndex vs Rewrite conflict), so running them concurrently made
index_id fail immediately. Chain them via task dependencies instead:
compact waits for merge_wal, index_id waits for compact.

- api: add optional depends_on to TaskRecord/EnqueueTaskRequest.
- scheduler: resolve deps before acquiring a permit (avoids deadlock at
  concurrency 1); defer-requeue while Waiting, mark Failed if a dep Failed.
- ui: OptimizeButton chains the three enqueues by captured task id.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@beinan

beinan commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up: fixed a gate-conflict found during e2e verification.

Optimize enqueues merge_wal → compact → index_id. Because the scheduler runs tasks concurrently (task_concurrency=4) and compact + index_id share the per-experiment base-table write gate, index_id was failing immediately with "a base-table write is already in progress".

Fix: task dependencies. compact now depends on merge_wal, index_id depends on compact, so the chain runs strictly in order.

  • TaskRecord/EnqueueTaskRequest gain optional depends_on: [task_id].
  • The dispatcher resolves deps before taking a semaphore permit (avoids deadlock at concurrency 1): defers+requeues while a dep is Queued/Running, marks the dependent Failed if a dep Failed.
  • OptimizeButton chains the three enqueues by captured task id.
  • New scheduler tests: dependent_task_runs_after_dependency_done, dependent_skipped_when_dependency_fails.

beinan and others added 2 commits July 16, 2026 01:35
The whole UI was a single stateful component with view/selection in a
zustand store, so nothing was shareable. Introduce react-router with
path-style routes so every screen has its own URL:

- /experiments                          list
- /experiments/:name                    detail drawer (Records tab)
- /experiments/:name/overview           detail drawer (Overview tab)
- /experiments/:name/records/:recordId  drawer with a record expanded
- /tasks                                 task queue

Navigation state (which experiment/tab/record is open) now lives entirely
in the URL, so refresh and share both land on the same view. The existing
server SPA fallback (ServeDir.fallback(index.html)) already serves these
deep paths; verified /experiments/:name/records/:id returns index.html.

Added "Copy link" affordances: a link icon by the drawer title and a
button in each expanded record. store.ts keeps only list search/pagination.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
# Conflicts:
#	crates/lance-context-master/src/routes.rs
#	crates/lance-context-master/src/scheduler.rs
@beinan beinan merged commit 6e2e402 into main Jul 16, 2026
9 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