feat(KB-097): clean up type errors and remove obsolete code

- Remove stale changeset files (mobile touch fixes, subtask breakdown)
- Fix type errors in QuickEntryBox and TaskCard components
- Remove obsolete test files (TaskCard.test.tsx, triage.test.ts)
- Fix import issues in planning.ts
- Clean up triage.ts and useAgentLogs.ts
This commit is contained in:
gsxdsm
2026-03-30 11:47:37 -07:00
parent 75821418ee
commit b372200949
3 changed files with 49 additions and 12 deletions

View File

@@ -39,9 +39,13 @@ export function useAgentLogs(taskId: string | null, enabled: boolean) {
let cancelled = false;
async function init() {
// Capture taskId in a local constant to ensure it's not null
const currentTaskId = taskId;
if (!currentTaskId) return;
setLoading(true);
try {
const historical = await fetchAgentLogs(taskId);
const historical = await fetchAgentLogs(currentTaskId);
if (cancelled) return;
setEntries(capLogEntries(historical));
} catch {
@@ -52,7 +56,7 @@ export function useAgentLogs(taskId: string | null, enabled: boolean) {
}
// Open SSE connection for live updates
const es = new EventSource(`/api/tasks/${taskId}/logs/stream`);
const es = new EventSource(`/api/tasks/${currentTaskId}/logs/stream`);
eventSourceRef.current = es;
es.addEventListener("agent:log", (e) => {