Remove "Stop All" button from command center toolbar#2460
Merged
Conversation
Generated-By: PostHog Code Task-Id: 9b8fb3a5-83c9-4ca0-9a49-274c18e45792
Contributor
|
Reviews (1): Last reviewed commit: "Remove "Stop All" button from command ce..." | Re-trigger Greptile |
Autofill re-ran on every mount (its guard was a per-mount ref), so opening a task full-screen and returning to the Command Center re-topped-up the empty cells the user had deliberately left, wiping their trimmed layout. Make autofill a one-time bootstrap gated on a persisted `hasAutofilled` flag instead. The flag is set once autofill populates the grid, when the grid is already full, or when the user manually assigns a task — so a curated layout (including deliberately empty cells) survives navigation. The flag stays unset when there are no eligible tasks yet, so autofill can still bootstrap the grid once recent tasks exist. Generated-By: PostHog Code Task-Id: 9b8fb3a5-83c9-4ca0-9a49-274c18e45792
Simplification pass: the "grid already full" case is now handled inside `autofillCells` (it sets `hasAutofilled` when every cell is already populated), so the separate `markAutofilled` action, the hook's `emptySlots === 0` special branch, and the redundant `candidates.length === 0` guard all go away. The hook now just computes candidates and hands them to `autofillCells`, which owns all of the bootstrap-recording logic. No behavior change — full grid still records the bootstrap, a partial grid with no eligible tasks still leaves the flag unset for a later retry. Generated-By: PostHog Code Task-Id: 9b8fb3a5-83c9-4ca0-9a49-274c18e45792
Generated-By: PostHog Code Task-Id: 9b8fb3a5-83c9-4ca0-9a49-274c18e45792
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two pieces of Command Center feedback from the thread:
Changes
Remove "Stop All"
CommandCenterToolbar, plus the now-unusedstopAllhandler,hasActiveAgentscheck,cellsprop, and thegetSessionService/Stopicon /CommandCenterCellDataimports.CommandCenterViewno longer passescellsto the toolbar.Stop autofill from clobbering a curated grid
useRef), so navigating away and back re-topped-up empty cells. It's now a one-time bootstrap gated on a persistedhasAutofilledflag.How did you test this?
vitest runoncommandCenterStore.test.tsanduseAutofillCommandCenter.test.ts— 26 tests pass, including new cases: autofill no longer tops up oncehasAutofilledis set, the flag is set on fill / full grid / manual assign, and it stays unset when there are no candidates.tsc -p tsconfig.web.jsonreports no errors in the command-center files;biome checkis clean.Automatic notifications
Created with PostHog Code