Add Re-index action to workspace chooser tile menu (CS-11741)#5384
Add Re-index action to workspace chooser tile menu (CS-11741)#5384FadhlanR wants to merge 7 commits into
Conversation
Surface a Re-index item in the "..." menu on each owned workspace tile. It calls RealmService.fullReindex(), which POSTs to the realm's _full-reindex endpoint and manages the indexing animation. The tile's RealmIcon now passes @canAnimate so the indexing pulse is visible for the whole reindex window, and the menu item is owner-gated and disabled while the realm is indexing. Failures surface an auto-dismissing inline error on the tile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ggling The disabled-while-indexing test reopened the tile menu before the final assertion, but the menu was already open from the disabled check, so the extra trigger click toggled it shut and the Re-index item no longer existed. The menu item's disabled state is derived from the live indexing flag and updates in place, so assert on the still-open menu after the index event instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…n test Fall back to String(error) when a thrown value has no message, so the inline reindex-error banner always renders. Emit a `full` index-completion event in the acceptance test to mirror the `_full-reindex` action it triggers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a user-facing Re-index action to the workspace chooser tile “…” menu for owned workspaces, wiring it to the existing RealmService.fullReindex() behavior and surfacing progress/error feedback in the tile UI.
Changes:
- Adds an owner-gated Re-index menu item that POSTs to
/_full-reindexand disables whilerealmInfo.isIndexingis true. - Enables indexing pulse animation on workspace tiles by passing
@canAnimate={{true}}toRealmIcon. - Adds acceptance coverage for owner gating, endpoint invocation + animation, disable-while-indexing, and inline error display.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/host/tests/acceptance/workspace-chooser-reindex-test.gts | New acceptance module covering the Re-index menu item behavior and UI feedback. |
| packages/host/app/components/operator-mode/workspace-chooser/workspace.gts | Adds the Re-index menu item, inline error display, and tile icon animation support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Auto-dismiss after a few seconds. A plain setTimeout (not an | ||
| // ember-concurrency timeout) so it does not keep test `settled()` waiting. | ||
| this.reindexErrorTimer = setTimeout(() => { | ||
| this.reindexError = undefined; | ||
| }, 5000); |
| this.reindexError = String(error?.message ?? error); | ||
| // Auto-dismiss after a few seconds. A plain setTimeout (not an | ||
| // ember-concurrency timeout) so it does not keep test `settled()` waiting. | ||
| this.reindexErrorTimer = setTimeout(() => { | ||
| this.reindexError = undefined; | ||
| }, 5000); |
There was a problem hiding this comment.
do we really want errors to auto dismiss?
There was a problem hiding this comment.
[Claude Code 🤖] Good call — agreed it shouldn't auto-dismiss. Removed the timer entirely. The failure now renders as a persistent banner across the top of the tile and stays until the user closes it with the banner's ✕ button (or it clears automatically when they retry the reindex). This also drops the stale-timer bookkeeping Copilot flagged.
The reindex failure error no longer disappears on a timer. It now renders as a banner across the top of the workspace tile and stays until the user closes it with the banner's dismiss button or retries the reindex. Removing the auto-dismiss timer also drops the stale-timer-handle bookkeeping. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A long server error body no longer grows the banner past the tile and over the workspace name. The message is clamped to three lines with an ellipsis and the full text stays available via the element's title on hover. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

CS-11741
What
Adds a Re-index item to the "..." (kebab) menu on each owned workspace tile in the workspace chooser. Previously the only way to re-index a workspace was the admin
_full-reindexendpoint.The action calls the existing
RealmService.fullReindex(), which POSTs to the realm's_full-reindexendpoint and wraps the call in the indexing animation (self-restoring on error). No backend changes.Details
canReindexWorkspaceshape).realmInfo.isIndexingflag rather thantask.isRunning. ThedropTaskresolves the instant the 204 lands (sub-second), while the reindex itself runs much longer —isIndexingstays true for the whole pass. Repeat clicks are server-safe regardless (the reindex queue coalesces them), so this guard is purely a UX nicety.RealmIconnow passes@canAnimate={{true}}(as the card URL bar already does), so the indexing pulse shows for the whole queued→running→done window.Tests
New dedicated acceptance module
workspace-chooser-reindex-test.gts(mirrors the sibling archive test + thefull-reindex-realmintegration test): owner-gating, POST-to-endpoint + tile animation, disabled-while-indexing, and failure surfacing an inline error.Verification
pnpm lint:js— cleanpnpm lint:types— no new errors (only the pre-existing baselineboxel-uimodule-resolution noise)Screen Recording
Screen.Recording.2026-07-02.at.16.53.42.mov
🤖 Generated with Claude Code