FN-5915: show unread badge on header mailbox
Add unread mailbox status to the desktop header toggle while keeping pending approvals prioritized. - show an unread status dot on the desktop header mailbox toggle when unread mail exists without pending approvals - keep pending-approval indicators taking precedence and hide mailbox indicators while the mailbox view is active - extend Header coverage for unread-only, pending-only, combined, zero-count, and active-mailbox states - update restart integration coverage to reuse an existing worktree during orphaned resume concurrency Files changed: docs/dashboard-guide.md | 2 +- packages/dashboard/app/components/Header.tsx | 9 +++++-- .../app/components/__tests__/Header.test.tsx | 26 ++++++++++++++++--- .../src/__tests__/restart.integration.test.ts | 29 ++++++++++++++++++++-- 4 files changed, 58 insertions(+), 8 deletions(-) Fusion-Task-Id: FN-5915 Fusion-Task-Lineage: 3a207e2c-ca58-402f-94cf-3a9e514fe263
This commit is contained in:
@@ -1298,9 +1298,34 @@ describe("Crash scenario edge cases", () => {
|
||||
|
||||
it("concurrent resumeOrphaned() calls don't double-execute the same task", async () => {
|
||||
const store = createMockStore();
|
||||
const task = makeTask("FN-092", "in-progress");
|
||||
const worktreePath = "/tmp/test/.worktrees/swift-falcon";
|
||||
const task = makeTask("FN-092", "in-progress", {
|
||||
worktree: worktreePath,
|
||||
branch: "fusion/fn-092",
|
||||
});
|
||||
store.listTasks.mockResolvedValue([task]);
|
||||
store.getTask.mockResolvedValue(makeTaskDetail("FN-092", "in-progress"));
|
||||
store.getTask.mockResolvedValue(makeTaskDetail("FN-092", "in-progress", {
|
||||
worktree: worktreePath,
|
||||
branch: "fusion/fn-092",
|
||||
}));
|
||||
mockedExecSync.mockImplementation(((cmd: unknown) => {
|
||||
if (String(cmd) === "git rev-parse --is-inside-work-tree") {
|
||||
return "true\n" as any;
|
||||
}
|
||||
if (String(cmd) === "git worktree list --porcelain") {
|
||||
return [
|
||||
"worktree /tmp/test",
|
||||
"HEAD abc123",
|
||||
"branch refs/heads/main",
|
||||
"",
|
||||
`worktree ${worktreePath}`,
|
||||
"HEAD def456",
|
||||
"branch refs/heads/fusion/fn-092",
|
||||
"",
|
||||
].join("\n") as any;
|
||||
}
|
||||
return Buffer.from("");
|
||||
}) as any);
|
||||
|
||||
let resolvePrompt: (() => void) | undefined;
|
||||
mockedCreateFnAgent.mockResolvedValue({
|
||||
|
||||
Reference in New Issue
Block a user