Skip to content

feat(web): add tree multi-select and bulk actions - #374

Merged
hanthor merged 6 commits into
tuna-os:mainfrom
hanthor:feat/web-tree-multiselect-344
Oct 2, 2026
Merged

hanthor merged 6 commits into
tuna-os:mainfrom
hanthor:feat/web-tree-multiselect-344

Conversation

@hanthor

@hanthor hanthor commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • share Ctrl/Cmd and Shift range selection between resource-tree rows and VM grids
  • add bulk start, stop, snapshot, tag, and delete actions to toolbars and context menus
  • add tree filtering by name, tag, and IP plus Arrow/Home/End/Enter/Space navigation
  • expose pool assignment and backend moves through a focusable menu as an alternative to dragging
  • add the bulk-select UI smoke acceptance check and upload its screenshot artifact

Tests

  • node --check pkg/web/static/app.js
  • node --check pkg/web/static/pools.js
  • node --check scripts/ui-smoke.mjs
  • git diff --check
  • go build ./...
  • go build -tags bootc ./...
  • go vet ./...
  • go test ./pkg/web -run 'TestServerRoutes|TestWebAssets'

Full go test ./pkg/web ./pkg/demo reaches the existing host-dependent OVMF doctor check and fails because this worker has no OVMF firmware. The local Playwright run could not launch Chromium because this worker lacks libglib-2.0.so.0; CI installs Chromium's system dependencies.

Fixes #344

— hive: backend=pi model=openai-codex/gpt-5.6-sol

@hanthor-hive-agent

Copy link
Copy Markdown
Contributor

🛑 Fix loop escalated — human attention needed

This PR has stayed red on the same commit through 6 automated fix re-dispatches with no new commit pushed (1 distinct red head seen). The hive has stopped dispatching further automated fixes for it.

Failing checks: ui-smoke

Raw failure evidence (from check-run annotations):

ui-smoke: Process completed with exit code 1.

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

@hanthor-hive-agent

Copy link
Copy Markdown
Contributor

✅ Escalation cleared — back in the automated lane

CI is green on the current head — returning this PR to the automated lane.

The needs-human label has been removed; the fix loop owns this PR again.

1 similar comment
@hanthor-hive-agent

Copy link
Copy Markdown
Contributor

✅ Escalation cleared — back in the automated lane

CI is green on the current head — returning this PR to the automated lane.

The needs-human label has been removed; the fix loop owns this PR again.

hanthor and others added 6 commits October 2, 2026 00:35
Ctrl/Cmd+K opens a command palette that searches VMs, CTs, nodes, pools,
views and actions ("stop web-prod", "migrate db-prod", "create VM").
Items run from it are remembered in localStorage and rank first. The
palette is a native <dialog> with a combobox/listbox, so screen readers
follow the active result.

Single-key shortcuts, ignored while typing in a field or a console:
? shortcut overlay, / focus the new tree filter, c console, s start/stop,
g d datacenter. Read-only callers are offered no action that mutates,
and the Create CT button is now hidden from them like Create VM.

The ui-smoke "command-palette" check presses Ctrl+K, types a demo VM
name, presses Enter and asserts that VM is selected; it saves
command-palette.png and shortcuts.png, which the workflow uploads.

No build step and no new dependency (ADR-0004): palette.js is a native
ES module embedded with the rest of static/.

Hive-Run: tuna-os#349
Hive-Plan: tuna-os#349 web UI command palette
Hive-Spec: tuna-os#349#acceptance-command-palette

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>
After Escape the palette returns focus to an input, where ? is text and
not a shortcut, so the overlay check failed intermittently on CI.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TexZnEN3jq4jRUi8T3zZuY
Signed-off-by: hanthor <hanthor@users.noreply.github.com>
Add right-click and keyboard (ContextMenu key, Shift+F10) context menus
to all tree rows (VMs, containers, nodes, namespaces, pools, hostpower)
and grid rows (VM table, CT table, template table).

The context menu follows each object's capabilities (start, stop, reboot,
console, migrate, snapshot, clone, convert to template, tags, delete),
positions itself within the viewport boundaries, is navigable with
arrow keys / Home / End / Escape / Enter, and closes on Escape or an
outside click.

For nodes, the menu integrates with host-power plugins (power on/off) and
surfaces cordon/drain items. For VMs, keyboard and menu equivalents for
drag gestures (assign to pool, move to backend) are provided for
accessibility. In read-only mode (body.read-only), all mutating actions
are hidden/omitted.

A smoke check in scripts/ui-smoke.mjs exercises the context menu against
the demo fleet and verifies the state change.

Closes tuna-os#343

Hive-Run: tuna-os#343
Hive-Plan: web-ui-context-menus
Hive-Spec: web-ui#context-menus
Signed-off-by: James Reilly <jreilly1821@gmail.com>
A poll re-render replaced the rows under an open menu. The smoke check
read disabled="" as enabled and tried to click a disabled Stop item, and
its has-text("Start") also matched Restart.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TexZnEN3jq4jRUi8T3zZuY
Signed-off-by: hanthor <hanthor@users.noreply.github.com>
Attach the VM menu to grid rows via a new mountGrid decorateRow hook,
and read the row text in the smoke check because grid column order is
user-configurable (the grid-columns check reorders it).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TexZnEN3jq4jRUi8T3zZuY
Signed-off-by: hanthor <hanthor@users.noreply.github.com>
…ore bulk actions

Rebuilds tuna-os#374 on top of the command palette (tuna-os#369), inventory grid (tuna-os#373)
and context menus (tuna-os#385), which already cover the tree filter box, the
shared tree/grid selection set and the pool/backend menu equivalents.
What this adds:
- Shift-click selects the visible range from the anchor, Ctrl/Cmd-click
  toggles; selected rows are marked and the grid follows.
- The tree filter also matches tags and IP addresses.
- Arrow/Home/End move focus between visible tree rows.
- Bulk Snapshot, Tag and Delete next to Start/Stop/Restart.
- A bulk-select smoke check.

Fixes tuna-os#344

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TexZnEN3jq4jRUi8T3zZuY
Signed-off-by: hanthor <hanthor@users.noreply.github.com>
@hanthor

hanthor commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

Rebuilt on top of #369/#373/#385, which already ship most of this PR: the tree filter box (#369), the shared tree/grid selection set (#373), and the pool/backend menu equivalents (#385). The original branch conflicted with all three in about 17 places. The new commit keeps only what was still missing: Shift and Ctrl/Cmd range selection in the tree, a tree filter that also matches tags and IPs, Arrow/Home/End focus movement, bulk Snapshot/Tag/Delete, and a bulk-select smoke check. That check reads the tree order from the DOM, because the old one hard-coded an order that the demo fleet does not use.

🤖 Generated with Claude Code
https://claude.ai/code/session_01TexZnEN3jq4jRUi8T3zZuY

@hanthor
hanthor merged commit 886faf7 into tuna-os:main Oct 2, 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.

Web UI: tree multi-select, bulk actions, keyboard navigation and a tree filter

1 participant