fix: event-loop freezes, plugin-install boot crash, tmux attach/scrollbar, Codex transcripts
- GET /api/workflows: one LEAD() window pass in a read worker (read-pool.js, workflow-stats.js); idx_events_session restored, idx_events_tool added - compat-sqlite gains function/pluck/readonly so a plugin install without a better-sqlite3 build boots again; antigravity-usage uses db.js's Database - install-hooks adds no checkout hooks while the agenthub plugin is enabled (events were doubled) - terminal attach runs the live tmux server's own binary; the pane scrollbar gets a visible 2-column style, and claude panes start with CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 so tmux keeps history to scroll - Codex sessions' conversation in GET /api/sessions/:id/transcript - Codex/Antigravity sessions claimed by their workspace without hooks - UI-audit follow-ups, docs and OpenAPI
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @file ActivityFeed.agents.test.ts
|
||||
* @description The Activity feed asks for agent labels by agent, not by
|
||||
* session: a subagent spawned later in a session already on screen is fetched
|
||||
* too, and an agent already asked about is not asked for again.
|
||||
* @author Nguyễn Ngọc Trí Vĩ <vinnt@smartgift.vn>
|
||||
*/
|
||||
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { agentsToFetch } from "../ActivityFeed";
|
||||
|
||||
describe("agentsToFetch", () => {
|
||||
it("asks again for a session once a new agent of it appears", () => {
|
||||
const asked = new Set(["s1-main"]);
|
||||
const events = [
|
||||
{ session_id: "s1", agent_id: "s1-main" },
|
||||
{ session_id: "s1", agent_id: "s1-sub-late" },
|
||||
{ session_id: "s2", agent_id: null },
|
||||
];
|
||||
expect(agentsToFetch(events, asked)).toEqual({
|
||||
agentIds: ["s1-sub-late"],
|
||||
sessionIds: ["s1"],
|
||||
});
|
||||
});
|
||||
|
||||
it("asks nothing when every agent on screen is known", () => {
|
||||
expect(agentsToFetch([{ session_id: "s1", agent_id: "a" }], new Set(["a"]))).toEqual({
|
||||
agentIds: [],
|
||||
sessionIds: [],
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user