diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 5fabeb4..5d0fc5b 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -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.6", + "version": "0.8.7", "types": "./types/index.d.ts", "author": { "name": "Guilherme Moraes" }, "license": "MIT" diff --git a/README.md b/README.md index b5ea954..d1d1527 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Then, in the repo you want to use it on: > 💡 To install from a local checkout instead, pass its path to `/plugin marketplace add`. -The plugin also adds a side pane. `/taskflow` +The plugin also adds a side pane. `/open-mod` opens it: every plan's progress, its active tasks and open questions, the pull requests with their links, a key for `/next-task`, and a delete button for a plan folder that asks before it removes anything. It opens by itself at session start on terminals of 144 diff --git a/eslint.config.js b/eslint.config.js index 3827e62..2ac6d06 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -8,6 +8,21 @@ export default tseslint.config( rules: { 'no-console': 'error', 'eqeqeq': 'error', + 'no-restricted-syntax': [ + 'error', + { + selector: + "ExportNamedDeclaration > VariableDeclaration > VariableDeclarator > ArrowFunctionExpression[params.0.name='$']", + message: + "Export a function that takes $ as a `function` declaration: the plugin engine follows $ across an import only into function declarations, and refuses the module otherwise.", + }, + { + selector: + "ExportNamedDeclaration > VariableDeclaration > VariableDeclarator > FunctionExpression[params.0.name='$']", + message: + "Export a function that takes $ as a `function` declaration: the plugin engine follows $ across an import only into function declarations, and refuses the module otherwise.", + }, + ], }, }, ) diff --git a/panel/data/settings.ts b/panel/data/settings.ts index 921fdef..14f1954 100644 --- a/panel/data/settings.ts +++ b/panel/data/settings.ts @@ -62,10 +62,13 @@ export async function openSettings($: EngineInterface) { await update($, settings, () => view) } -export const closeSettings = ($: EngineInterface) => update($, settings, () => null) +export function closeSettings($: EngineInterface) { + return update($, settings, () => null) +} -export const editSettings = ($: EngineInterface, change: Partial) => - update($, settings, view => (view === null ? view : { ...view, draft: { ...view.draft, ...change } })) +export function editSettings($: EngineInterface, change: Partial) { + return update($, settings, view => (view === null ? view : { ...view, draft: { ...view.draft, ...change } })) +} export async function submitSettings($: EngineInterface, draft: SettingsView['draft']) { const saved = await saveSettings($, draft) diff --git a/panel/register.tsx b/panel/register.tsx index 1e8ecc7..84dd275 100644 --- a/panel/register.tsx +++ b/panel/register.tsx @@ -16,7 +16,7 @@ async function openPane($: EngineInterface, focus = false) { export const register: Register = on => { on('session.start', async ($, e, next) => { - await $.command.register({ name: 'taskflow', description: 'Open the Taskflow pane: plans, tasks, PRs' }) + await $.command.register({ name: 'open-mod', description: 'Open the Taskflow pane: plans, tasks, PRs' }) void loadBoard($) void openPane($) $.clock.every(100, () => void update($, animationStep, step => step + 1)) @@ -33,7 +33,7 @@ export const register: Register = on => { return next(e) }) - on('command.run', { command: 'taskflow' }, async $ => { + on('command.run', { command: 'open-mod' }, async $ => { await loadBoard($) await openPane($, true)