Add visual feedback for Move to Ready action (#165)
* feat(orchestrator): add visual feedback when moving jobs to Ready
- Added `toast.message("Moving job to Ready...")` in `OrchestratorPage.tsx` for single item keyboard shortcut action.
- Added `toast.message("Moving jobs to Ready...")` in `useBulkJobSelection.ts` for bulk `move_to_ready` action.
- Updated `OrchestratorPage.test.tsx` to verify the toast notification.
This addresses the issue where pressing 'R' provided no visual feedback until the action completed.
* fix(orchestrator): remove accidental db files
Removed `orchestrator/data/jobs.db`, `orchestrator/data/jobs.db-shm`, and `orchestrator/data/jobs.db-wal` which were accidentally created during testing.
* fix(orchestrator): remove accidental root sqlite.db
Removed `orchestrator/sqlite.db` which was also accidentally created.
This commit is contained in:
parent
f8b5dc2f42
commit
e6563e74c3
@ -932,6 +932,7 @@ describe("OrchestratorPage", () => {
|
|||||||
|
|
||||||
pressKey("r");
|
pressKey("r");
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
|
expect(toast.message).toHaveBeenCalledWith("Moving job to Ready...");
|
||||||
// Mock useOrchestratorData returns selectedJob as job-1 always
|
// Mock useOrchestratorData returns selectedJob as job-1 always
|
||||||
expect(api.processJob).toHaveBeenCalledWith("job-1");
|
expect(api.processJob).toHaveBeenCalledWith("job-1");
|
||||||
});
|
});
|
||||||
|
|||||||
@ -464,6 +464,7 @@ export const OrchestratorPage: React.FC = () => {
|
|||||||
|
|
||||||
shortcutActionInFlight.current = true;
|
shortcutActionInFlight.current = true;
|
||||||
const jobId = selectedJob.id;
|
const jobId = selectedJob.id;
|
||||||
|
toast.message("Moving job to Ready...");
|
||||||
|
|
||||||
api
|
api
|
||||||
.processJob(jobId)
|
.processJob(jobId)
|
||||||
|
|||||||
@ -112,6 +112,10 @@ export function useBulkJobSelection({
|
|||||||
const selectedAtStartSet = new Set(selectedAtStart);
|
const selectedAtStartSet = new Set(selectedAtStart);
|
||||||
try {
|
try {
|
||||||
setBulkActionInFlight(action);
|
setBulkActionInFlight(action);
|
||||||
|
if (action === "move_to_ready") {
|
||||||
|
toast.message("Moving jobs to Ready...");
|
||||||
|
}
|
||||||
|
|
||||||
const result = await api.bulkJobAction({
|
const result = await api.bulkJobAction({
|
||||||
action,
|
action,
|
||||||
jobIds: selectedAtStart,
|
jobIds: selectedAtStart,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user