Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "taskflow",
"description": "Plan-and-task workflow: scope/tasks/questions/progress scaffolding split into pull requests under a line budget, acceptance criteria agreed up front, tests red before green, one-task-per-commit cycle, questions answered at the task that needs them, red-first bug fixes, docs-and-diagram sync, standards review.",
"version": "0.8.3",
"version": "0.8.4",
"types": "./types/index.d.ts",
"author": { "name": "Guilherme Moraes" },
"license": "MIT"
Expand Down
18 changes: 18 additions & 0 deletions panel/data/board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,24 @@ export async function loadBoard($: EngineInterface) {
}
}

// A cheap fingerprint of what the board shows: the resolved plan dir and every PROGRESS.md's mtime.
export async function boardSignature($: EngineInterface) {
const root = await repoRoot($)
const resolved = await readPlanDir($, root)
if ('error' in resolved) return `error:${resolved.error}`
if (!(await $.fs.exists(resolved.base))) return `missing:${resolved.base}`

const stamps: string[] = [resolved.base]
for (const entry of await $.fs.list(resolved.base)) {
if (entry.kind !== 'dir') continue
const progressPath = `${resolved.base}/${entry.name}/PROGRESS.md`
if (!(await $.fs.exists(progressPath))) continue
stamps.push(`${entry.name}:${(await $.fs.stat(progressPath)).mtimeMs}`)
}

return stamps.join('|')
}

async function realPath($: EngineInterface, path: string) {
const resolved = await $.process.run(['realpath', '--', path])

Expand Down
12 changes: 11 additions & 1 deletion panel/register.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { atom, update } from 'claude-code'
import type { EngineInterface, Register } from 'claude-code'

import { loadBoard } from './data/board'
import { boardSignature, loadBoard } from './data/board'
import { renderPane } from './ui/pane'

const PANE = 'taskflow'
const TITLE = 'Taskflow'
const WATCH_MS = 1000

const animationStep = atom({ plugin: 'taskflow', key: 'animationStep' } as const, 0)

Expand All @@ -20,6 +21,15 @@ export const register: Register = on => {
void openPane($)
$.clock.every(100, () => void update($, animationStep, step => step + 1))

// Reload whenever a PROGRESS.md changes - mid-turn, from a subagent or from Obsidian - not only at turn end.
let lastSignature = ''
$.clock.every(WATCH_MS, async () => {
const signature = await boardSignature($)
if (signature === lastSignature) return
lastSignature = signature
await loadBoard($)
})

return next(e)
})

Expand Down
Loading