taskchef 8.6.2 → 8.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +8 -4
- package/assets/README.md +19 -0
- package/assets/taskchef-app-rounded.png +0 -0
- package/assets/taskchef-avatar-square.png +0 -0
- package/assets/taskchef-avatar-square.svg +8 -0
- package/assets/taskchef-sidebar-dark.svg +6 -0
- package/assets/taskchef-sidebar-light.svg +6 -0
- package/assets/taskchef-sidebar.svg +6 -0
- package/docs/advanced-guide.md +20 -29
- package/docs/dashboard-ui.md +15 -0
- package/docs/diagrams/taskchef-next-reply-lookup.drawio +38 -0
- package/docs/diagrams/taskchef-next-reply-lookup.drawio.png +0 -0
- package/docs/diagrams/taskchef-next-storage.drawio +41 -0
- package/docs/diagrams/taskchef-next-storage.drawio.png +0 -0
- package/docs/images/taskchef-pr-icon-comparison.jpg +0 -0
- package/docs/images/taskchef-unified-status-popup.jpg +0 -0
- package/docs/mcp-app.md +261 -6
- package/docs/spec.md +24 -69
- package/docs/taskchef-next-github.md +206 -0
- package/docs/taskchef-next-status-research.md +102 -0
- package/docs/taskchef-next-storage.md +167 -0
- package/docs/workflows.md +4 -2
- package/node_modules/@napi-rs/keyring/LICENSE +21 -0
- package/node_modules/@napi-rs/keyring/README.md +45 -0
- package/node_modules/@napi-rs/keyring/index.d.ts +232 -0
- package/node_modules/@napi-rs/keyring/index.js +706 -0
- package/node_modules/@napi-rs/keyring/keytar.d.ts +53 -0
- package/node_modules/@napi-rs/keyring/keytar.js +26 -0
- package/node_modules/@napi-rs/keyring/package.json +126 -0
- package/node_modules/@napi-rs/keyring-darwin-arm64/README.md +3 -0
- package/node_modules/@napi-rs/keyring-darwin-arm64/keyring.darwin-arm64.node +0 -0
- package/node_modules/@napi-rs/keyring-darwin-arm64/package.json +32 -0
- package/node_modules/@napi-rs/keyring-darwin-x64/README.md +3 -0
- package/node_modules/@napi-rs/keyring-darwin-x64/keyring.darwin-x64.node +0 -0
- package/node_modules/@napi-rs/keyring-darwin-x64/package.json +32 -0
- package/node_modules/@napi-rs/keyring-linux-arm64-gnu/README.md +3 -0
- package/node_modules/@napi-rs/keyring-linux-arm64-gnu/keyring.linux-arm64-gnu.node +0 -0
- package/node_modules/@napi-rs/keyring-linux-arm64-gnu/package.json +35 -0
- package/node_modules/@napi-rs/keyring-linux-arm64-musl/README.md +3 -0
- package/node_modules/@napi-rs/keyring-linux-arm64-musl/keyring.linux-arm64-musl.node +0 -0
- package/node_modules/@napi-rs/keyring-linux-arm64-musl/package.json +35 -0
- package/node_modules/@napi-rs/keyring-linux-x64-gnu/README.md +3 -0
- package/node_modules/@napi-rs/keyring-linux-x64-gnu/keyring.linux-x64-gnu.node +0 -0
- package/node_modules/@napi-rs/keyring-linux-x64-gnu/package.json +35 -0
- package/node_modules/@napi-rs/keyring-linux-x64-musl/README.md +3 -0
- package/node_modules/@napi-rs/keyring-linux-x64-musl/keyring.linux-x64-musl.node +0 -0
- package/node_modules/@napi-rs/keyring-linux-x64-musl/package.json +35 -0
- package/node_modules/@napi-rs/keyring-win32-arm64-msvc/README.md +3 -0
- package/node_modules/@napi-rs/keyring-win32-arm64-msvc/keyring.win32-arm64-msvc.node +0 -0
- package/node_modules/@napi-rs/keyring-win32-arm64-msvc/package.json +32 -0
- package/node_modules/@napi-rs/keyring-win32-x64-msvc/README.md +3 -0
- package/node_modules/@napi-rs/keyring-win32-x64-msvc/keyring.win32-x64-msvc.node +0 -0
- package/node_modules/@napi-rs/keyring-win32-x64-msvc/package.json +32 -0
- package/node_modules/@types/debug/LICENSE +21 -0
- package/node_modules/@types/debug/README.md +69 -0
- package/node_modules/@types/debug/index.d.ts +50 -0
- package/node_modules/@types/debug/package.json +58 -0
- package/node_modules/@types/mdast/LICENSE +21 -0
- package/node_modules/@types/mdast/README.md +15 -0
- package/node_modules/@types/mdast/index.d.ts +1123 -0
- package/node_modules/@types/mdast/package.json +47 -0
- package/node_modules/@types/ms/LICENSE +21 -0
- package/node_modules/@types/ms/README.md +82 -0
- package/node_modules/@types/ms/index.d.ts +63 -0
- package/node_modules/@types/ms/package.json +26 -0
- package/node_modules/@types/unist/LICENSE +21 -0
- package/node_modules/@types/unist/README.md +15 -0
- package/node_modules/@types/unist/index.d.ts +119 -0
- package/node_modules/@types/unist/package.json +60 -0
- package/node_modules/character-entities/index.d.ts +6 -0
- package/node_modules/character-entities/index.js +2132 -0
- package/node_modules/character-entities/license +22 -0
- package/node_modules/character-entities/package.json +78 -0
- package/node_modules/character-entities/readme.md +152 -0
- package/node_modules/decode-named-character-reference/index.d.ts +13 -0
- package/node_modules/decode-named-character-reference/index.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts +6 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.js +32 -0
- package/node_modules/decode-named-character-reference/index.js +19 -0
- package/node_modules/decode-named-character-reference/license +22 -0
- package/node_modules/decode-named-character-reference/package.json +90 -0
- package/node_modules/decode-named-character-reference/readme.md +136 -0
- package/node_modules/dequal/dist/index.js +86 -0
- package/node_modules/dequal/dist/index.min.js +1 -0
- package/node_modules/dequal/dist/index.mjs +84 -0
- package/node_modules/dequal/index.d.ts +1 -0
- package/node_modules/dequal/license +21 -0
- package/node_modules/dequal/lite/index.d.ts +1 -0
- package/node_modules/dequal/lite/index.js +31 -0
- package/node_modules/dequal/lite/index.min.js +1 -0
- package/node_modules/dequal/lite/index.mjs +29 -0
- package/node_modules/dequal/package.json +57 -0
- package/node_modules/dequal/readme.md +112 -0
- package/node_modules/devlop/lib/default.js +9 -0
- package/node_modules/devlop/lib/development.d.ts +84 -0
- package/node_modules/devlop/lib/development.js +238 -0
- package/node_modules/devlop/license +22 -0
- package/node_modules/devlop/package.json +80 -0
- package/node_modules/devlop/readme.md +360 -0
- package/node_modules/mdast-util-from-markdown/dev/index.d.ts +23 -0
- package/node_modules/mdast-util-from-markdown/dev/index.js +2 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts +53 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts.map +1 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.js +1348 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/types.d.ts +295 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/types.js +2 -0
- package/node_modules/mdast-util-from-markdown/index.d.ts +23 -0
- package/node_modules/mdast-util-from-markdown/index.js +2 -0
- package/node_modules/mdast-util-from-markdown/lib/index.d.ts +53 -0
- package/node_modules/mdast-util-from-markdown/lib/index.js +1177 -0
- package/node_modules/mdast-util-from-markdown/lib/types.d.ts +295 -0
- package/node_modules/mdast-util-from-markdown/lib/types.js +2 -0
- package/node_modules/mdast-util-from-markdown/license +22 -0
- package/node_modules/mdast-util-from-markdown/package.json +139 -0
- package/node_modules/mdast-util-from-markdown/readme.md +537 -0
- package/node_modules/mdast-util-to-string/index.d.ts +2 -0
- package/node_modules/mdast-util-to-string/index.js +5 -0
- package/node_modules/mdast-util-to-string/lib/index.d.ts +31 -0
- package/node_modules/mdast-util-to-string/lib/index.js +108 -0
- package/node_modules/mdast-util-to-string/license +22 -0
- package/node_modules/mdast-util-to-string/package.json +78 -0
- package/node_modules/mdast-util-to-string/readme.md +218 -0
- package/node_modules/micromark/dev/index.d.ts +82 -0
- package/node_modules/micromark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark/dev/index.js +68 -0
- package/node_modules/micromark/dev/lib/compile.d.ts +16 -0
- package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/compile.js +1162 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/constructs.js +101 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.js +718 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/content.js +99 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/document.js +449 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/flow.js +86 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/text.js +248 -0
- package/node_modules/micromark/dev/lib/parse.d.ts +10 -0
- package/node_modules/micromark/dev/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/parse.js +58 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/postprocess.js +19 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/preprocess.js +139 -0
- package/node_modules/micromark/dev/stream.d.ts +35 -0
- package/node_modules/micromark/dev/stream.d.ts.map +1 -0
- package/node_modules/micromark/dev/stream.js +270 -0
- package/node_modules/micromark/index.d.ts +82 -0
- package/node_modules/micromark/index.d.ts.map +1 -0
- package/node_modules/micromark/index.js +60 -0
- package/node_modules/micromark/lib/compile.d.ts +16 -0
- package/node_modules/micromark/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/lib/compile.js +1068 -0
- package/node_modules/micromark/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/lib/constructs.js +85 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/lib/create-tokenizer.js +613 -0
- package/node_modules/micromark/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/content.js +79 -0
- package/node_modules/micromark/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/document.js +370 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/flow.js +58 -0
- package/node_modules/micromark/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/text.js +216 -0
- package/node_modules/micromark/lib/parse.d.ts +10 -0
- package/node_modules/micromark/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/lib/parse.js +56 -0
- package/node_modules/micromark/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/postprocess.js +18 -0
- package/node_modules/micromark/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/preprocess.js +112 -0
- package/node_modules/micromark/license +22 -0
- package/node_modules/micromark/package.json +87 -0
- package/node_modules/micromark/readme.md +488 -0
- package/node_modules/micromark/stream.d.ts +35 -0
- package/node_modules/micromark/stream.d.ts.map +1 -0
- package/node_modules/micromark/stream.js +256 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/index.js +22 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +294 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.js +269 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.js +62 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.js +162 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.js +69 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.js +166 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +472 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +178 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.js +257 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.js +185 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.js +295 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +65 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +229 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +938 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.js +783 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +658 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +119 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +71 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.js +34 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.js +306 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +67 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +213 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +120 -0
- package/node_modules/micromark-core-commonmark/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/index.js +22 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/attention.js +231 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.js +233 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.js +143 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.js +64 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.js +149 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +422 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +159 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.js +225 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/content.js +163 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/definition.js +254 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +60 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +191 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +827 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.js +678 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.js +561 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +110 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +63 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.js +33 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/list.js +213 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +187 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.js +102 -0
- package/node_modules/micromark-core-commonmark/license +22 -0
- package/node_modules/micromark-core-commonmark/package.json +62 -0
- package/node_modules/micromark-core-commonmark/readme.md +171 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/dev/index.js +255 -0
- package/node_modules/micromark-factory-destination/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/index.js +206 -0
- package/node_modules/micromark-factory-destination/license +22 -0
- package/node_modules/micromark-factory-destination/package.json +57 -0
- package/node_modules/micromark-factory-destination/readme.md +234 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/dev/index.js +172 -0
- package/node_modules/micromark-factory-label/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/index.js +148 -0
- package/node_modules/micromark-factory-label/license +22 -0
- package/node_modules/micromark-factory-label/package.json +60 -0
- package/node_modules/micromark-factory-label/readme.md +224 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts +60 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/dev/index.js +122 -0
- package/node_modules/micromark-factory-space/index.d.ts +60 -0
- package/node_modules/micromark-factory-space/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/index.js +116 -0
- package/node_modules/micromark-factory-space/license +22 -0
- package/node_modules/micromark-factory-space/package.json +46 -0
- package/node_modules/micromark-factory-space/readme.md +225 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/dev/index.js +169 -0
- package/node_modules/micromark-factory-title/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/index.js +158 -0
- package/node_modules/micromark-factory-title/license +22 -0
- package/node_modules/micromark-factory-title/package.json +58 -0
- package/node_modules/micromark-factory-title/readme.md +229 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/dev/index.js +53 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/index.js +44 -0
- package/node_modules/micromark-factory-whitespace/license +22 -0
- package/node_modules/micromark-factory-whitespace/package.json +57 -0
- package/node_modules/micromark-factory-whitespace/readme.md +205 -0
- package/node_modules/micromark-util-character/dev/index.d.ts +195 -0
- package/node_modules/micromark-util-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/dev/index.js +252 -0
- package/node_modules/micromark-util-character/index.d.ts +195 -0
- package/node_modules/micromark-util-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/index.js +246 -0
- package/node_modules/micromark-util-character/license +22 -0
- package/node_modules/micromark-util-character/package.json +57 -0
- package/node_modules/micromark-util-character/readme.md +446 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/dev/index.js +89 -0
- package/node_modules/micromark-util-chunked/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/index.js +81 -0
- package/node_modules/micromark-util-chunked/license +22 -0
- package/node_modules/micromark-util-chunked/package.json +57 -0
- package/node_modules/micromark-util-chunked/readme.md +219 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/dev/index.js +38 -0
- package/node_modules/micromark-util-classify-character/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/index.js +27 -0
- package/node_modules/micromark-util-classify-character/license +22 -0
- package/node_modules/micromark-util-classify-character/package.json +59 -0
- package/node_modules/micromark-util-classify-character/readme.md +205 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts +22 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts.map +1 -0
- package/node_modules/micromark-util-combine-extensions/index.js +143 -0
- package/node_modules/micromark-util-combine-extensions/license +22 -0
- package/node_modules/micromark-util-combine-extensions/package.json +52 -0
- package/node_modules/micromark-util-combine-extensions/readme.md +201 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js +42 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.js +32 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/license +22 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/package.json +59 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/readme.md +184 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/dev/index.js +53 -0
- package/node_modules/micromark-util-decode-string/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/index.js +45 -0
- package/node_modules/micromark-util-decode-string/license +22 -0
- package/node_modules/micromark-util-decode-string/package.json +63 -0
- package/node_modules/micromark-util-decode-string/readme.md +179 -0
- package/node_modules/micromark-util-edit-map/dev/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/dev/index.js +237 -0
- package/node_modules/micromark-util-edit-map/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/index.js +225 -0
- package/node_modules/micromark-util-edit-map/license +22 -0
- package/node_modules/micromark-util-edit-map/package.json +48 -0
- package/node_modules/micromark-util-edit-map/readme.md +234 -0
- package/node_modules/micromark-util-encode/index.d.ts +14 -0
- package/node_modules/micromark-util-encode/index.d.ts.map +1 -0
- package/node_modules/micromark-util-encode/index.js +33 -0
- package/node_modules/micromark-util-encode/license +22 -0
- package/node_modules/micromark-util-encode/package.json +47 -0
- package/node_modules/micromark-util-encode/readme.md +176 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts +30 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts.map +1 -0
- package/node_modules/micromark-util-html-tag-name/index.js +93 -0
- package/node_modules/micromark-util-html-tag-name/license +22 -0
- package/node_modules/micromark-util-html-tag-name/package.json +47 -0
- package/node_modules/micromark-util-html-tag-name/readme.md +193 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.js +38 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/index.js +33 -0
- package/node_modules/micromark-util-normalize-identifier/license +22 -0
- package/node_modules/micromark-util-normalize-identifier/package.json +58 -0
- package/node_modules/micromark-util-normalize-identifier/readme.md +187 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts +22 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts.map +1 -0
- package/node_modules/micromark-util-resolve-all/index.js +32 -0
- package/node_modules/micromark-util-resolve-all/license +22 -0
- package/node_modules/micromark-util-resolve-all/package.json +48 -0
- package/node_modules/micromark-util-resolve-all/readme.md +238 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.js +124 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/index.js +107 -0
- package/node_modules/micromark-util-sanitize-uri/license +22 -0
- package/node_modules/micromark-util-sanitize-uri/package.json +59 -0
- package/node_modules/micromark-util-sanitize-uri/readme.md +214 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/index.js +284 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js +288 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/index.js +228 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +251 -0
- package/node_modules/micromark-util-subtokenize/license +22 -0
- package/node_modules/micromark-util-subtokenize/package.json +60 -0
- package/node_modules/micromark-util-subtokenize/readme.md +181 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts +139 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/codes.js +158 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts +37 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/constants.js +44 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts +5 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/default.js +4 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts +106 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/types.js +453 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts +102 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/values.js +109 -0
- package/node_modules/micromark-util-symbol/license +22 -0
- package/node_modules/micromark-util-symbol/package.json +43 -0
- package/node_modules/micromark-util-symbol/readme.md +168 -0
- package/node_modules/micromark-util-types/index.d.ts +1315 -0
- package/node_modules/micromark-util-types/index.js +2 -0
- package/node_modules/micromark-util-types/license +22 -0
- package/node_modules/micromark-util-types/package.json +37 -0
- package/node_modules/micromark-util-types/readme.md +151 -0
- package/node_modules/smol-toml/LICENSE +24 -0
- package/node_modules/smol-toml/README.md +605 -0
- package/node_modules/smol-toml/dist/date.d.ts +41 -0
- package/node_modules/smol-toml/dist/date.js +156 -0
- package/node_modules/smol-toml/dist/error.d.ts +37 -0
- package/node_modules/smol-toml/dist/error.js +67 -0
- package/node_modules/smol-toml/dist/extract.js +289 -0
- package/node_modules/smol-toml/dist/index.cjs +770 -0
- package/node_modules/smol-toml/dist/index.d.ts +44 -0
- package/node_modules/smol-toml/dist/index.js +34 -0
- package/node_modules/smol-toml/dist/parse.d.ts +73 -0
- package/node_modules/smol-toml/dist/parse.js +164 -0
- package/node_modules/smol-toml/dist/primitive.js +151 -0
- package/node_modules/smol-toml/dist/stringify.d.ts +32 -0
- package/node_modules/smol-toml/dist/stringify.js +219 -0
- package/node_modules/smol-toml/dist/struct.js +156 -0
- package/node_modules/smol-toml/dist/util.d.ts +43 -0
- package/node_modules/smol-toml/dist/util.js +57 -0
- package/node_modules/smol-toml/package.json +68 -0
- package/node_modules/unist-util-stringify-position/index.d.ts +1 -0
- package/node_modules/unist-util-stringify-position/index.js +1 -0
- package/node_modules/unist-util-stringify-position/lib/index.d.ts +61 -0
- package/node_modules/unist-util-stringify-position/lib/index.js +84 -0
- package/node_modules/unist-util-stringify-position/license +22 -0
- package/node_modules/unist-util-stringify-position/package.json +80 -0
- package/node_modules/unist-util-stringify-position/readme.md +206 -0
- package/package.json +27 -8
- package/scripts/prepare-github-keyring.js +29 -0
- package/src/codex-app.js +20 -2
- package/src/codex-pricing.js +79 -0
- package/src/codex-projects.js +90 -0
- package/src/codex-session-scanner.js +748 -0
- package/src/codex-session-usage.js +332 -0
- package/src/dashboard/app.js +2 -2
- package/src/dashboard/dist/app.js +135 -60
- package/src/dashboard/dist/app.js.map +1 -1
- package/src/dashboard/dist/styles.css +1 -1
- package/src/dashboard/react/components/AnimatedUsage.test.tsx +78 -0
- package/src/dashboard/react/components/CardStatusIcons.test.tsx +146 -0
- package/src/dashboard/react/components/CardStatusIcons.tsx +138 -0
- package/src/dashboard/react/components/ImageGallery.tsx +22 -0
- package/src/dashboard/react/components/ModelSettings.test.tsx +4 -4
- package/src/dashboard/react/components/ModelSettings.tsx +1 -1
- package/src/dashboard/react/components/OpenChatButton.test.tsx +19 -0
- package/src/dashboard/react/components/OpenChatButton.tsx +2 -1
- package/src/dashboard/react/components/PrGlyph.tsx +35 -0
- package/src/dashboard/react/components/PullRequestBadges.tsx +18 -0
- package/src/dashboard/react/components/QueuedPrompts.test.tsx +42 -0
- package/src/dashboard/react/components/QueuedPrompts.tsx +34 -0
- package/src/dashboard/react/components/RelativeTime.test.tsx +100 -0
- package/src/dashboard/react/components/RelativeTime.tsx +46 -11
- package/src/dashboard/react/components/ReplyCover.test.tsx +30 -0
- package/src/dashboard/react/components/ReplyCover.tsx +33 -0
- package/src/dashboard/react/components/ReplyImagePreview.test.tsx +90 -0
- package/src/dashboard/react/components/ReplyImagePreview.tsx +34 -0
- package/src/dashboard/react/components/ReplyMarkdown.test.tsx +108 -0
- package/src/dashboard/react/components/ReplyMarkdown.tsx +112 -0
- package/src/dashboard/react/components/SavedUsageFormat.test.tsx +11 -0
- package/src/dashboard/react/components/SavedUsageFormat.tsx +68 -0
- package/src/dashboard/react/components/StatusBadge.tsx +2 -2
- package/src/dashboard/react/components/TaskBoard.test.tsx +256 -1
- package/src/dashboard/react/components/TaskBoard.tsx +136 -28
- package/src/dashboard/react/components/TaskCard.tsx +7 -4
- package/src/dashboard/react/components/TaskDetail.test.tsx +92 -1
- package/src/dashboard/react/components/TaskDetail.tsx +37 -10
- package/src/dashboard/react/components/TurnContent.test.tsx +44 -0
- package/src/dashboard/react/components/TurnContent.tsx +53 -0
- package/src/dashboard/react/components/UsagePanel.tsx +2 -2
- package/src/dashboard/react/image-cache.test.ts +23 -0
- package/src/dashboard/react/image-cache.ts +33 -0
- package/src/dashboard/react/presentation.test.tsx +31 -0
- package/src/dashboard/react/styles.css +126 -2
- package/src/dashboard/react/types.ts +55 -1
- package/src/dashboard/time.js +39 -0
- package/src/dashboard.js +4 -3
- package/src/data/codex-pricing.json +537 -0
- package/src/mcp-app/dist/index.html +216 -112
- package/src/mcp-app/react/AppearancePicker.test.tsx +50 -0
- package/src/mcp-app/react/AppearancePicker.tsx +56 -0
- package/src/mcp-app/react/GitHubConnection.test.tsx +78 -0
- package/src/mcp-app/react/GitHubConnection.tsx +78 -0
- package/src/mcp-app/react/NextNotificationCenter.test.tsx +121 -0
- package/src/mcp-app/react/NextNotificationCenter.tsx +94 -0
- package/src/mcp-app/react/NextTaskDetail.test.tsx +124 -0
- package/src/mcp-app/react/NextTaskDetail.tsx +147 -0
- package/src/mcp-app/react/ProjectPicker.tsx +49 -0
- package/src/mcp-app/react/main.test.tsx +499 -49
- package/src/mcp-app/react/main.tsx +359 -86
- package/src/mcp-app/react/styles.css +186 -9
- package/src/mcp-app/react/themes.test.ts +34 -0
- package/src/mcp-app/react/themes.ts +112 -0
- package/src/mcp-app.js +238 -120
- package/src/mcp.js +8 -1
- package/src/next-cache.js +16 -0
- package/src/next-github.js +273 -0
- package/src/next-notifications.js +90 -0
- package/src/recorded-usage-tracker.js +92 -0
- package/src/reply-image.js +65 -0
- package/src/usage-tracker.js +7 -6
- package/src/usage.js +7 -355
- package/src/user-prompt.js +55 -0
- package/src/version.js +0 -1
- package/node_modules/proper-lockfile/CHANGELOG.md +0 -108
- package/node_modules/which/CHANGELOG.md +0 -166
- package/src/resolve-ccusage.js +0 -17
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Stack, Text } from "@mantine/core";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { useReducedMotion } from "@mantine/hooks";
|
|
4
|
+
import type { SavedUsage } from "../types";
|
|
5
|
+
|
|
6
|
+
export function compactTokens(value: number) {
|
|
7
|
+
const units = ["", "K", "M", "B", "T"];
|
|
8
|
+
let amount = value, unit = 0;
|
|
9
|
+
while (amount >= 1000 && unit < units.length - 1) { amount /= 1000; unit++; }
|
|
10
|
+
if (unit && Number(amount.toFixed(2)) >= 1000 && unit < units.length - 1) { amount /= 1000; unit++; }
|
|
11
|
+
return unit ? `${amount.toFixed(2)}${units[unit]}` : amount.toLocaleString();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function savedUsageCost(value: SavedUsage) {
|
|
15
|
+
if (!value.samples || (value.costPartial && value.costUsd === 0)) return "—";
|
|
16
|
+
return `$${value.costUsd.toFixed(2)}`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function turnUsageLabel(value: SavedUsage) {
|
|
20
|
+
return `${value.samples ? compactTokens(value.tokens.total_tokens) : "—"} • ${savedUsageCost(value)}`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function TokenBreakdown({ value }: { value: SavedUsage }) {
|
|
24
|
+
return <Stack gap={2}>
|
|
25
|
+
<Text inherit>Input: {value.tokens.input_tokens.toLocaleString()}</Text>
|
|
26
|
+
<Text inherit>Cached input: {value.tokens.cached_input_tokens.toLocaleString()}</Text>
|
|
27
|
+
<Text inherit>Cache writes: {value.tokens.cache_write_input_tokens.toLocaleString()}</Text>
|
|
28
|
+
<Text inherit>Output: {value.tokens.output_tokens.toLocaleString()}</Text>
|
|
29
|
+
<Text inherit>Reasoning: {value.tokens.reasoning_output_tokens.toLocaleString()} (included in output)</Text>
|
|
30
|
+
{value.partial && <Text inherit>Some saved usage records or turn links are missing or incomplete.</Text>}
|
|
31
|
+
</Stack>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
export function useAnimatedUsage(value: SavedUsage | undefined, running: boolean, identity?: string | null) {
|
|
36
|
+
const reducedMotion = useReducedMotion();
|
|
37
|
+
const targetTokens = value?.tokens.total_tokens ?? 0;
|
|
38
|
+
const targetCost = value?.costUsd ?? 0;
|
|
39
|
+
const current = useRef({ tokens: 0, cost: 0, identity });
|
|
40
|
+
const [display, setDisplay] = useState(() => running && !reducedMotion ? { tokens: 0, cost: 0 } : { tokens: targetTokens, cost: targetCost });
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const target = { tokens: targetTokens, cost: targetCost };
|
|
43
|
+
const from = current.current.identity === identity ? current.current : { tokens: 0, cost: 0 };
|
|
44
|
+
current.current = { ...from, identity };
|
|
45
|
+
if (!running || reducedMotion || (from.tokens === targetTokens && from.cost === targetCost)) {
|
|
46
|
+
current.current = { ...target, identity };
|
|
47
|
+
setDisplay(target);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
setDisplay(from);
|
|
51
|
+
const started = performance.now();
|
|
52
|
+
let frame = 0;
|
|
53
|
+
const tick = (now: number) => {
|
|
54
|
+
const progress = Math.min(1, Math.max(0, (now - started) / 800));
|
|
55
|
+
const eased = 1 - (1 - progress) ** 3;
|
|
56
|
+
const next = progress === 1 ? target : { tokens: from.tokens + (targetTokens - from.tokens) * eased, cost: from.cost + (targetCost - from.cost) * eased };
|
|
57
|
+
current.current = { ...next, identity };
|
|
58
|
+
setDisplay(next);
|
|
59
|
+
if (progress < 1) frame = requestAnimationFrame(tick);
|
|
60
|
+
};
|
|
61
|
+
frame = requestAnimationFrame(tick);
|
|
62
|
+
return () => cancelAnimationFrame(frame);
|
|
63
|
+
}, [targetTokens, targetCost, running, reducedMotion, identity]);
|
|
64
|
+
if (!value) return undefined;
|
|
65
|
+
const shown = !running || reducedMotion ? { tokens: targetTokens, cost: targetCost }
|
|
66
|
+
: current.current.identity !== identity ? { tokens: 0, cost: 0 } : display;
|
|
67
|
+
return { ...value, tokens: { ...value.tokens, total_tokens: Math.round(shown.tokens) }, costUsd: shown.cost };
|
|
68
|
+
}
|
|
@@ -2,6 +2,6 @@ import { Badge } from "@mantine/core";
|
|
|
2
2
|
import { statusColor, statusLabel } from "../presentation";
|
|
3
3
|
import type { Task } from "../types";
|
|
4
4
|
|
|
5
|
-
export function StatusBadge({ status }: { status: Task["status"] | "interrupted" }) {
|
|
6
|
-
return <Badge className="taskchef-status-badge" color={statusColor(status)} size="sm" variant="light">{statusLabel(status)}</Badge>;
|
|
5
|
+
export function StatusBadge({ status, label }: { status: Task["status"] | "interrupted"; label?: string }) {
|
|
6
|
+
return <Badge className="taskchef-status-badge" color={statusColor(status)} size="sm" variant="light">{label ?? statusLabel(status)}</Badge>;
|
|
7
7
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MantineProvider } from "@mantine/core";
|
|
2
|
-
import { cleanup, fireEvent, render, screen, within } from "@testing-library/react";
|
|
2
|
+
import { act, cleanup, fireEvent, render, screen, within } from "@testing-library/react";
|
|
3
3
|
import { afterEach, expect, test, vi } from "vitest";
|
|
4
4
|
import { fixtureTask } from "../fixtures";
|
|
5
|
+
import type { Task } from "../types";
|
|
5
6
|
import { TaskBoard } from "./TaskBoard";
|
|
6
7
|
|
|
7
8
|
afterEach(cleanup);
|
|
@@ -14,6 +15,18 @@ function task(id: number, status: ReturnType<typeof fixtureTask>["status"], titl
|
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
test("observed running cards show elapsed time and return to a date when the turn ends", () => {
|
|
19
|
+
const running = task(1, "working");
|
|
20
|
+
running.observed = { archive: false, lastTurnEvent: "inProgress", lastTurnEventAt: new Date(Date.now() - 754000).toISOString(), recentFileActivity: true };
|
|
21
|
+
const props = { completedLimit: 5, onMoreCompleted: vi.fn(), onOpenCodex: vi.fn(), onOpenDetail: vi.fn() };
|
|
22
|
+
const { rerender } = render(<MantineProvider><TaskBoard {...props} tasks={[running]} /></MantineProvider>);
|
|
23
|
+
expect(screen.getByLabelText(/^Elapsed time:/)).toHaveTextContent(/^12m$/);
|
|
24
|
+
expect(screen.queryByRole("button", { name: /^Updated time:/ })).not.toBeInTheDocument();
|
|
25
|
+
rerender(<MantineProvider><TaskBoard {...props} tasks={[{ ...running, status: "needs_input" }]} /></MantineProvider>);
|
|
26
|
+
expect(screen.queryByLabelText(/^Elapsed time:/)).not.toBeInTheDocument();
|
|
27
|
+
expect(screen.getByRole("button", { name: /^Updated time:/ })).toBeInTheDocument();
|
|
28
|
+
});
|
|
29
|
+
|
|
17
30
|
function pointer(target: Element, type: string, pointerType: string, clientX: number, pointerId = 1) {
|
|
18
31
|
const event = new MouseEvent(type, { bubbles: true, button: 0, clientX });
|
|
19
32
|
Object.assign(event, { pointerType, pointerId, isPrimary: true });
|
|
@@ -120,3 +133,245 @@ test("card controls and touch gestures do not start mouse panning", () => {
|
|
|
120
133
|
fireEvent.click(title);
|
|
121
134
|
expect(onOpenDetail).toHaveBeenCalledOnce();
|
|
122
135
|
});
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
test("keeps Archived separate from Done and limits archived cards", () => {
|
|
139
|
+
const archived = Array.from({ length: 8 }, (_, index) => task(index + 10, "archived"));
|
|
140
|
+
const more = vi.fn();
|
|
141
|
+
render(<MantineProvider><TaskBoard lanes={[{ status: "completed", label: "Done" }, { status: "archived", label: "Archived" }]} tasks={[task(1, "completed"), ...archived]} completedLimit={5} onMoreArchived={more} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} /></MantineProvider>);
|
|
142
|
+
expect(within(screen.getByRole("region", { name: "Done, 1 tasks" })).getAllByRole("article")).toHaveLength(1);
|
|
143
|
+
const archive = screen.getByRole("region", { name: "Archived, 8 tasks" });
|
|
144
|
+
expect(within(archive).getAllByRole("article")).toHaveLength(5);
|
|
145
|
+
fireEvent.click(within(archive).getByRole("button", { name: "Show 3 more · 5 of 8" }));
|
|
146
|
+
expect(more).toHaveBeenCalledOnce();
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
test("Done and Archived expand independently", () => {
|
|
151
|
+
const done = Array.from({ length: 8 }, (_, i) => task(i, "completed"));
|
|
152
|
+
const archived = Array.from({ length: 8 }, (_, i) => task(i + 20, "archived"));
|
|
153
|
+
const moreDone = vi.fn(); const moreArchived = vi.fn();
|
|
154
|
+
const props = { lanes: [{ status: "completed" as const, label: "Done" }, { status: "archived" as const, label: "Archived" }], tasks: [...done, ...archived], completedLimit: 5, onMoreCompleted: moreDone, onMoreArchived: moreArchived, onOpenCodex: vi.fn(), onOpenDetail: vi.fn() };
|
|
155
|
+
const { rerender } = render(<MantineProvider><TaskBoard {...props} archivedLimit={5} /></MantineProvider>);
|
|
156
|
+
const archiveLane = screen.getByRole("region", { name: "Archived, 8 tasks" });
|
|
157
|
+
fireEvent.click(within(archiveLane).getByRole("button", { name: /Show 3 more/ }));
|
|
158
|
+
expect(moreArchived).toHaveBeenCalledOnce(); expect(moreDone).not.toHaveBeenCalled();
|
|
159
|
+
rerender(<MantineProvider><TaskBoard {...props} archivedLimit={10} /></MantineProvider>);
|
|
160
|
+
expect(within(screen.getByRole("region", { name: "Done, 8 tasks" })).getAllByRole("article")).toHaveLength(5);
|
|
161
|
+
expect(within(screen.getByRole("region", { name: "Archived, 8 tasks" })).getAllByRole("article")).toHaveLength(8);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
test("Next groups interrupted cards under Waiting with a tag and keeps empty Scheduled", () => {
|
|
166
|
+
const lanes = [{ status: "scheduled" as const, label: "Scheduled", emptyMessage: "No scheduled chats" }, { status: "needs_input" as const, label: "Waiting for input/review" }, { status: "completed" as const, label: "Done" }];
|
|
167
|
+
const interrupted = task(1, "interrupted");
|
|
168
|
+
const { rerender } = render(<MantineProvider><TaskBoard lanes={lanes} tasks={[interrupted]} groupInterruptedWithWaiting completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} /></MantineProvider>);
|
|
169
|
+
expect(within(screen.getByRole("region", { name: "Scheduled, 0 tasks" })).getByText("No scheduled chats")).toBeVisible();
|
|
170
|
+
expect(within(screen.getByRole("region", { name: "Waiting for input/review, 1 tasks" })).getByText("Interrupted")).toBeVisible();
|
|
171
|
+
expect(screen.queryByRole("region", { name: /Unverified/ })).not.toBeInTheDocument();
|
|
172
|
+
rerender(<MantineProvider><TaskBoard lanes={lanes} tasks={[interrupted, task(2, "scheduled")]} groupInterruptedWithWaiting completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} /></MantineProvider>);
|
|
173
|
+
expect(screen.getByRole("region", { name: "Scheduled, 1 tasks" })).toBeVisible();
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
test("reports only intersecting cards and does not observe unrendered Done cards", () => {
|
|
178
|
+
let notify!: IntersectionObserverCallback;
|
|
179
|
+
const observe = vi.fn();
|
|
180
|
+
const disconnect = vi.fn();
|
|
181
|
+
vi.stubGlobal("IntersectionObserver", class {
|
|
182
|
+
constructor(callback: IntersectionObserverCallback) { notify = callback; }
|
|
183
|
+
observe = observe;
|
|
184
|
+
disconnect = disconnect;
|
|
185
|
+
});
|
|
186
|
+
try {
|
|
187
|
+
const onVisibleTasksChange = vi.fn();
|
|
188
|
+
const tasks = [task(1,"working"),task(2,"completed"),task(3,"completed")];
|
|
189
|
+
const view = render(<MantineProvider><TaskBoard tasks={tasks} completedLimit={1} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} onVisibleTasksChange={onVisibleTasksChange} /></MantineProvider>);
|
|
190
|
+
const cards = observe.mock.calls.map(([element]) => element as HTMLElement);
|
|
191
|
+
expect(cards).toHaveLength(2);
|
|
192
|
+
act(() => notify([{target:cards[0],isIntersecting:true},{target:cards[1],isIntersecting:false}] as unknown as IntersectionObserverEntry[], {} as IntersectionObserver));
|
|
193
|
+
expect(onVisibleTasksChange).toHaveBeenLastCalledWith([cards[0].dataset.chatId]);
|
|
194
|
+
act(() => notify([{target:cards[0],isIntersecting:false},{target:cards[1],isIntersecting:true}] as unknown as IntersectionObserverEntry[], {} as IntersectionObserver));
|
|
195
|
+
expect(onVisibleTasksChange).toHaveBeenLastCalledWith([cards[1].dataset.chatId]);
|
|
196
|
+
const observations = observe.mock.calls.length;
|
|
197
|
+
const previousNotify = notify;
|
|
198
|
+
view.rerender(<MantineProvider><TaskBoard tasks={tasks.map(item => ({...item, summary:"Updated reply"}))} completedLimit={1} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} onVisibleTasksChange={onVisibleTasksChange} /></MantineProvider>);
|
|
199
|
+
expect(observe.mock.calls.length).toBe(observations);
|
|
200
|
+
view.rerender(<MantineProvider><TaskBoard tasks={[tasks[0]]} completedLimit={1} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} onVisibleTasksChange={onVisibleTasksChange} /></MantineProvider>);
|
|
201
|
+
expect(onVisibleTasksChange).toHaveBeenLastCalledWith([]);
|
|
202
|
+
act(() => previousNotify([{target:cards[0],isIntersecting:true}] as unknown as IntersectionObserverEntry[], {} as IntersectionObserver));
|
|
203
|
+
expect(onVisibleTasksChange).toHaveBeenLastCalledWith([]);
|
|
204
|
+
view.rerender(<MantineProvider><TaskBoard tasks={[]} completedLimit={1} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} onVisibleTasksChange={onVisibleTasksChange} /></MantineProvider>);
|
|
205
|
+
expect(onVisibleTasksChange).toHaveBeenLastCalledWith([]);
|
|
206
|
+
onVisibleTasksChange.mockClear();
|
|
207
|
+
view.unmount();
|
|
208
|
+
expect(onVisibleTasksChange).toHaveBeenLastCalledWith([]);
|
|
209
|
+
expect(disconnect).toHaveBeenCalled();
|
|
210
|
+
} finally { vi.unstubAllGlobals(); }
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
test("card footer orders time, schedule clock and PR icon; project has a folder",()=>{
|
|
214
|
+
const scheduled=task(1,"needs_input"); scheduled.scheduled=true;
|
|
215
|
+
scheduled.nextRunAt=new Date(Date.now()+3600000).toISOString();
|
|
216
|
+
scheduled.pullRequests=[{url:"https://github.com/example/repo/pull/12",state:"merged",checks:"passed",title:"Improve search"}];
|
|
217
|
+
render(<MantineProvider><TaskBoard tasks={[scheduled]} completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()}/></MantineProvider>);
|
|
218
|
+
const card=screen.getByRole("article");
|
|
219
|
+
expect(card.querySelector(".taskchef-board-project svg")).toBeInTheDocument();
|
|
220
|
+
expect(screen.queryByText("Active schedule")).not.toBeInTheDocument();
|
|
221
|
+
const stats=card.querySelector(".taskchef-card-stats")!;
|
|
222
|
+
expect(stats.children[0]).toHaveClass("taskchef-time");
|
|
223
|
+
expect(stats.children[1]).toHaveAttribute("aria-label","Active schedule");
|
|
224
|
+
expect(stats.children[2]).toHaveClass("taskchef-card-pr-icons");
|
|
225
|
+
expect(within(card).getByLabelText("#12 Improve search: Merged")).toBeInTheDocument();
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
test("shows the Running spinner only for a populated Running lane", () => {
|
|
230
|
+
const props = { completedLimit: 5, onMoreCompleted: vi.fn(), onOpenCodex: vi.fn(), onOpenDetail: vi.fn() };
|
|
231
|
+
const running = task(1, "working");
|
|
232
|
+
const lanes = [{ status: "working" as const, label: "Running" }];
|
|
233
|
+
const { rerender } = render(<MantineProvider><TaskBoard {...props} lanes={lanes} tasks={[running]} /></MantineProvider>);
|
|
234
|
+
expect(screen.getByRole("img", { name: "Running chats" })).toBeInTheDocument();
|
|
235
|
+
rerender(<MantineProvider><TaskBoard {...props} lanes={lanes} tasks={[]} /></MantineProvider>);
|
|
236
|
+
expect(screen.queryByRole("img", { name: "Running chats" })).not.toBeInTheDocument();
|
|
237
|
+
rerender(<MantineProvider><TaskBoard {...props} tasks={[running]} /></MantineProvider>);
|
|
238
|
+
expect(screen.queryByRole("img", { name: "Running chats" })).not.toBeInTheDocument();
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
test("all cards can drag and valid destinations are highlighted without moving cards early", () => {
|
|
243
|
+
const move = vi.fn();
|
|
244
|
+
const waiting = task(1, "needs_input");
|
|
245
|
+
const lanes = [{ status: "working" as const, label: "Running" }, { status: "needs_input" as const, label: "Waiting" }, { status: "completed" as const, label: "Done" }, { status: "scheduled" as const, label: "Scheduled" }, { status: "archived" as const, label: "Archived" }];
|
|
246
|
+
render(<MantineProvider><TaskBoard lanes={lanes} tasks={[waiting, task(2, "working"), task(3, "scheduled")]} completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} onMoveTask={move} /></MantineProvider>);
|
|
247
|
+
const card = within(screen.getByRole("region", { name: "Waiting, 1 tasks" })).getByRole("article");
|
|
248
|
+
expect(card).toHaveAttribute("draggable", "true");
|
|
249
|
+
expect(within(screen.getByRole("region", { name: "Running, 1 tasks" })).getByRole("article")).toHaveAttribute("draggable", "true");
|
|
250
|
+
expect(within(screen.getByRole("region", { name: "Scheduled, 1 tasks" })).getByRole("article")).toHaveAttribute("draggable", "true");
|
|
251
|
+
const destination = screen.getByRole("region", { name: "Done, 0 tasks" });
|
|
252
|
+
fireEvent.drop(destination);
|
|
253
|
+
expect(move).not.toHaveBeenCalled();
|
|
254
|
+
fireEvent.dragStart(within(card).getByRole("button", { name: waiting.title }), { dataTransfer: { setData: vi.fn() } });
|
|
255
|
+
fireEvent.drop(destination);
|
|
256
|
+
expect(move).not.toHaveBeenCalled();
|
|
257
|
+
fireEvent.dragStart(card, { dataTransfer: { setData: vi.fn() } });
|
|
258
|
+
expect(destination).toHaveClass("taskchef-board-lane-drop-target");
|
|
259
|
+
expect(screen.getByRole("region", { name: "Scheduled, 1 tasks" })).not.toHaveClass("taskchef-board-lane-drop-target");
|
|
260
|
+
fireEvent.drop(destination);
|
|
261
|
+
expect(destination).not.toHaveClass("taskchef-board-lane-drop-target");
|
|
262
|
+
expect(move).toHaveBeenCalledWith(waiting, "completed");
|
|
263
|
+
expect(card).toBeInTheDocument();
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
test("running, scheduled, done and archived cards can drop into Archived only", () => {
|
|
268
|
+
const move = vi.fn();
|
|
269
|
+
const lanes = [{ status: "working" as const, label: "Running" }, { status: "scheduled" as const, label: "Scheduled" }, { status: "completed" as const, label: "Done" }, { status: "archived" as const, label: "Archived" }];
|
|
270
|
+
const tasks = [task(1, "working"), task(2, "scheduled"), task(3, "completed"), task(4, "archived")];
|
|
271
|
+
render(<MantineProvider><TaskBoard lanes={lanes} tasks={tasks} completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} onMoveTask={move} /></MantineProvider>);
|
|
272
|
+
const archive = screen.getByRole("region", { name: "Archived, 1 tasks" });
|
|
273
|
+
for (const item of tasks) {
|
|
274
|
+
const card = screen.getAllByRole("article").find(card => card.dataset.chatId === item.id)!;
|
|
275
|
+
fireEvent.dragStart(card, { dataTransfer: { setData: vi.fn() } });
|
|
276
|
+
expect(archive).toHaveClass("taskchef-board-lane-drop-target");
|
|
277
|
+
expect(screen.getByRole("region", { name: "Done, 1 tasks" })).not.toHaveClass("taskchef-board-lane-drop-target");
|
|
278
|
+
fireEvent.drop(archive);
|
|
279
|
+
expect(move).toHaveBeenLastCalledWith(item, "archived");
|
|
280
|
+
expect(archive).not.toHaveClass("taskchef-board-lane-drop-target");
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
test.each(["scheduled", "pr"])("blocked %s waiting cards highlight only valid destinations and clear on drag end", (kind) => {
|
|
285
|
+
const waiting = { ...task(1, "needs_input"), turnId: "turn-1", ...(kind === "scheduled" ? { scheduled: true, inputSource: "ordinary" as const } : { pullRequests: [{ state: "open", url: "https://github.com/example/repo/pull/1", checks: "pending" }] as Task["pullRequests"] }) };
|
|
286
|
+
const lanes = [{ status: "needs_input" as const, label: "Waiting" }, { status: "completed" as const, label: "Done" }, { status: "scheduled" as const, label: "Scheduled" }];
|
|
287
|
+
render(<MantineProvider><TaskBoard lanes={lanes} tasks={[waiting]} completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} onMoveTask={vi.fn()} /></MantineProvider>);
|
|
288
|
+
const card = screen.getByRole("article");
|
|
289
|
+
fireEvent.dragStart(card, { dataTransfer: { setData: vi.fn() } });
|
|
290
|
+
expect(screen.getByRole("region", { name: "Done, 0 tasks" })).not.toHaveClass("taskchef-board-lane-drop-target");
|
|
291
|
+
expect(screen.getByRole("region", { name: "Scheduled, 0 tasks" }).classList.contains("taskchef-board-lane-drop-target")).toBe(kind === "scheduled");
|
|
292
|
+
fireEvent.dragEnd(card);
|
|
293
|
+
expect(document.querySelector(".taskchef-board-lane-drop-target")).toBeNull();
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
test("first load shows Loading instead of empty queue messages", () => {
|
|
298
|
+
render(<MantineProvider><TaskBoard loading tasks={[]} lanes={[{status: "working", label: "Running", emptyMessage: "No chats running"}, {status: "completed", label: "Done"}]} completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} /></MantineProvider>);
|
|
299
|
+
expect(screen.getAllByText("Loading…")).toHaveLength(2);
|
|
300
|
+
expect(screen.queryByText("No chats running")).not.toBeInTheDocument();
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
test("cards animate between queue positions and honor reduced motion", () => {
|
|
304
|
+
const animate = vi.fn();
|
|
305
|
+
const rect = vi.spyOn(HTMLElement.prototype, "getBoundingClientRect").mockImplementation(function (this: HTMLElement) {
|
|
306
|
+
const left = this.closest('[aria-label="Done, 1 tasks"]') ? 320 : 0;
|
|
307
|
+
return {left, top: 100, right: left + 300, bottom: 200, width: 300, height: 100, x: left, y: 100, toJSON() { return {}; }};
|
|
308
|
+
});
|
|
309
|
+
vi.stubGlobal("matchMedia", () => ({ matches: false, addEventListener: vi.fn(), removeEventListener: vi.fn() }));
|
|
310
|
+
Object.defineProperty(HTMLElement.prototype, "animate", { configurable: true, value: animate });
|
|
311
|
+
const props = { lanes: [{ status: "needs_input" as const, label: "Waiting" }, { status: "completed" as const, label: "Done" }], completedLimit: 5, onMoreCompleted: vi.fn(), onOpenCodex: vi.fn(), onOpenDetail: vi.fn() };
|
|
312
|
+
try {
|
|
313
|
+
const { rerender } = render(<MantineProvider><TaskBoard {...props} tasks={[task(1, "needs_input")]} /></MantineProvider>);
|
|
314
|
+
expect(animate).not.toHaveBeenCalled();
|
|
315
|
+
rerender(<MantineProvider><TaskBoard {...props} tasks={[task(1, "completed")]} /></MantineProvider>);
|
|
316
|
+
expect(animate).toHaveBeenCalledWith([{transform: "translate(-320px, 0px)"}, {transform: "translate(0, 0)"}], {duration: 280, easing: "ease-out"});
|
|
317
|
+
animate.mockClear();
|
|
318
|
+
vi.stubGlobal("matchMedia", () => ({ matches: true, addEventListener: vi.fn(), removeEventListener: vi.fn() }));
|
|
319
|
+
rerender(<MantineProvider><TaskBoard {...props} tasks={[task(1, "needs_input")]} /></MantineProvider>);
|
|
320
|
+
expect(animate).not.toHaveBeenCalled();
|
|
321
|
+
} finally { rect.mockRestore(); delete (HTMLElement.prototype as unknown as {animate?: unknown}).animate; vi.unstubAllGlobals(); }
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
test("native image and link drags move the card while their clicks stay available", async () => {
|
|
326
|
+
const waiting = {...task(1, "needs_input"), observed: {archive: false, lastTurnEvent: "completed", lastTurnEventAt: null, recentFileActivity: false}, replyExcerpt: "See [report](https://example.com/report)", replyImage: {url: "/local/image.png", alt: "Report image"}};
|
|
327
|
+
const move = vi.fn();
|
|
328
|
+
render(<MantineProvider><TaskBoard loadImage={async () => "data:image/png;base64,AAAA"} tasks={[waiting]} lanes={[{status: "needs_input", label: "Waiting"}, {status: "completed", label: "Done"}]} completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} onMoveTask={move} /></MantineProvider>);
|
|
329
|
+
const card = screen.getByRole("article");
|
|
330
|
+
const destination = screen.getByRole("region", {name: "Done, 0 tasks"});
|
|
331
|
+
for (const element of [within(card).getByRole("link", {name: "report"}), await within(card).findByRole("img", {name: "Report image"})]) {
|
|
332
|
+
const dataTransfer = {setData: vi.fn(), setDragImage: vi.fn()};
|
|
333
|
+
fireEvent.dragStart(element, {dataTransfer, clientX: 10, clientY: 10});
|
|
334
|
+
expect(destination).toHaveClass("taskchef-board-lane-drop-target");
|
|
335
|
+
expect(dataTransfer.setDragImage).toHaveBeenCalled();
|
|
336
|
+
fireEvent.drop(destination);
|
|
337
|
+
expect(move).toHaveBeenLastCalledWith(waiting, "completed");
|
|
338
|
+
}
|
|
339
|
+
expect(within(card).getByRole("link", {name: "report"})).toHaveAttribute("href", "https://example.com/report");
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
test("unread dots follow Codex read state and do not mark a chat read on Details", () => {
|
|
343
|
+
const chat = task(1, "needs_input");
|
|
344
|
+
chat.observed = { archive: false, unread: true, lastTurnEvent: "completed", lastTurnEventAt: null, recentFileActivity: false };
|
|
345
|
+
const props = { completedLimit: 5, onMoreCompleted: vi.fn(), onOpenCodex: vi.fn(), onOpenDetail: vi.fn() };
|
|
346
|
+
const { rerender } = render(<MantineProvider><TaskBoard {...props} tasks={[chat]} /></MantineProvider>);
|
|
347
|
+
expect(screen.getByRole("img", {name: "Unread chat"})).toBeVisible();
|
|
348
|
+
fireEvent.click(screen.getByRole("button", { name: chat.title }));
|
|
349
|
+
expect(props.onOpenDetail).toHaveBeenCalledWith(chat);
|
|
350
|
+
expect(screen.getByRole("img", {name: "Unread chat"})).toBeVisible();
|
|
351
|
+
rerender(<MantineProvider><TaskBoard {...props} tasks={[{...chat, observed: {...chat.observed, unread: false}}]} /></MantineProvider>);
|
|
352
|
+
expect(screen.queryByRole("img", {name: "Unread chat"})).toBeNull();
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
test("card usage is on by default and the setting removes usage data from the status line", () => {
|
|
356
|
+
const item = task(1, "needs_input");
|
|
357
|
+
item.observed = {archive: false, lastTurnEvent: "completed", lastTurnEventAt: item.updatedAt, recentFileActivity: false, latestTurnDurationMs: 60000};
|
|
358
|
+
item.turnUsage = {tokens:{input_tokens:1000,cached_input_tokens:0,cache_write_input_tokens:0,output_tokens:100,reasoning_output_tokens:0,total_tokens:1100},costUsd:2.34,samples:1,partial:false,costPartial:false};
|
|
359
|
+
const props = {tasks:[item],completedLimit:5,onMoreCompleted:vi.fn(),onOpenCodex:vi.fn(),onOpenDetail:vi.fn()};
|
|
360
|
+
const view = render(<MantineProvider env="test"><TaskBoard {...props} /></MantineProvider>);
|
|
361
|
+
expect(screen.getByText("1.10K • $2.34")).toBeVisible();
|
|
362
|
+
view.rerender(<MantineProvider env="test"><TaskBoard {...props} showCardUsage={false} /></MantineProvider>);
|
|
363
|
+
expect(screen.queryByText("1.10K • $2.34")).toBeNull();
|
|
364
|
+
expect(screen.queryByText(/Turn usage:/)).toBeNull();
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
test("covers prefer response images and fall back to prompt images for every status", async () => {
|
|
368
|
+
const running={...task(1,"working"),observed:{archive:false,lastTurnEvent:"inProgress",lastTurnEventAt:null,recentFileActivity:false},promptImage:{url:"/prompt-first.png",alt:"First prompt"},replyImage:{url:"/reply.png",alt:"Reply"}};
|
|
369
|
+
const load=vi.fn().mockResolvedValue("data:image/png;base64,AAAA");
|
|
370
|
+
const {rerender}=render(<MantineProvider><TaskBoard loadImage={load} tasks={[running]} lanes={[{status:"working",label:"Running"},{status:"needs_input",label:"Waiting"}]} completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} /></MantineProvider>);
|
|
371
|
+
expect(await screen.findByAltText("Reply")).toBeVisible();
|
|
372
|
+
expect(load).toHaveBeenCalledWith(running,"/reply.png");
|
|
373
|
+
expect(screen.queryByAltText("First prompt")).toBeNull();
|
|
374
|
+
rerender(<MantineProvider><TaskBoard loadImage={load} tasks={[{...running,status:"needs_input",replyImage:null}]} lanes={[{status:"working",label:"Running"},{status:"needs_input",label:"Waiting"}]} completedLimit={5} onMoreCompleted={vi.fn()} onOpenCodex={vi.fn()} onOpenDetail={vi.fn()} /></MantineProvider>);
|
|
375
|
+
expect(await screen.findByAltText("First prompt")).toBeVisible();
|
|
376
|
+
expect(screen.queryByRole("img",{name:"Reply"})).toBeNull();
|
|
377
|
+
});
|
|
@@ -1,41 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CardStatusLine } from "./CardStatusIcons";
|
|
2
|
+
import { Badge, Box, Button, Paper, Stack, Text, Title, Tooltip } from "@mantine/core";
|
|
3
|
+
import { useLayoutEffect, useRef, useState, type ReactNode, type PointerEvent as ReactPointerEvent } from "react";
|
|
4
|
+
import { IconArrowUpRight, IconFolder } from "@tabler/icons-react";
|
|
4
5
|
import { hasLinkedCodexThread, latestTurnPresentation } from "../../state.js";
|
|
5
6
|
import type { Task, TaskStatus } from "../types";
|
|
6
7
|
import { LinkedText } from "./LinkedText";
|
|
7
|
-
import {
|
|
8
|
+
import { TurnContent } from "./TurnContent";
|
|
9
|
+
import { QueuedPrompts } from "./QueuedPrompts";
|
|
10
|
+
import { ReplyCover } from "./ReplyCover";
|
|
11
|
+
import { ElapsedTime, RelativeTime } from "./RelativeTime";
|
|
8
12
|
|
|
9
|
-
const
|
|
13
|
+
const defaultLanes: { status: TaskStatus; label: string; emptyMessage?: string }[] = [
|
|
10
14
|
{ status: "working", label: "Working" },
|
|
11
15
|
{ status: "needs_input", label: "Needs input" },
|
|
12
16
|
{ status: "completed", label: "Completed" },
|
|
13
17
|
{ status: "failed", label: "Failed" },
|
|
14
18
|
{ status: null, label: "Unresolved" },
|
|
15
19
|
];
|
|
16
|
-
const knownStatuses = new Set<TaskStatus>(["working", "needs_input", "completed", "failed"]);
|
|
17
|
-
|
|
18
|
-
function laneFor(task: Task): TaskStatus {
|
|
19
|
-
return knownStatuses.has(task.status) ? task.status : null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
20
|
export function TaskBoard({
|
|
21
|
+
lanes = defaultLanes,
|
|
22
|
+
loading = false,
|
|
23
|
+
showCardUsage = true,
|
|
24
|
+
groupInterruptedWithWaiting = false,
|
|
25
|
+
loadImage,
|
|
26
|
+
doneNotice,
|
|
27
|
+
onVisibleTasksChange,
|
|
28
|
+
onMoveTask,
|
|
23
29
|
completedLimit,
|
|
30
|
+
archivedLimit = 5,
|
|
31
|
+
onMoreArchived,
|
|
24
32
|
onMoreCompleted,
|
|
25
33
|
onOpenCodex,
|
|
26
34
|
onOpenDetail,
|
|
27
35
|
tasks,
|
|
28
36
|
}: {
|
|
37
|
+
loading?: boolean;
|
|
38
|
+
showCardUsage?: boolean;
|
|
39
|
+
onMoveTask?: (task: Task, destination: TaskStatus) => void;
|
|
40
|
+
groupInterruptedWithWaiting?: boolean;
|
|
41
|
+
doneNotice?: ReactNode;
|
|
42
|
+
onVisibleTasksChange?: (ids: string[]) => void;
|
|
43
|
+
loadImage?: (task: Task, url?: string) => Promise<string | null>;
|
|
44
|
+
lanes?: { status: TaskStatus; label: string; emptyMessage?: string }[];
|
|
29
45
|
completedLimit: number;
|
|
46
|
+
archivedLimit?: number;
|
|
47
|
+
onMoreArchived?: () => void;
|
|
30
48
|
onMoreCompleted: () => void;
|
|
31
49
|
onOpenCodex: (task: Task) => void;
|
|
32
50
|
onOpenDetail: (task: Task) => void;
|
|
33
51
|
tasks: Task[];
|
|
34
52
|
}) {
|
|
53
|
+
const draggedTask = useRef<Task | null>(null);
|
|
54
|
+
const [dragging, setDragging] = useState<Task | null>(null);
|
|
55
|
+
const isWaiting = (task: Task) => ["needs_input", "interrupted"].includes(task.status ?? "");
|
|
56
|
+
const canDrop = (task: Task, destination: TaskStatus) => destination === "archived" || (isWaiting(task) && (destination === "completed"
|
|
57
|
+
? !task.scheduled && !task.pullRequests?.some(pr => pr.state !== "merged")
|
|
58
|
+
: destination === "scheduled" && !!task.scheduled && task.inputSource === "ordinary" && !!task.turnId));
|
|
59
|
+
const acceptsDrop = (task: Task, destination: TaskStatus) => destination === "archived" || (isWaiting(task) && ["completed", "scheduled"].includes(destination ?? ""));
|
|
35
60
|
const boardRef = useRef<HTMLDivElement>(null);
|
|
61
|
+
const previousPositions = useRef(new Map<string, { left: number; top: number }>());
|
|
36
62
|
const dragRef = useRef<{ pointerId: number; startX: number; scrollLeft: number; moved: boolean } | null>(null);
|
|
37
63
|
const suppressClickRef = useRef(false);
|
|
38
64
|
|
|
65
|
+
// Observe the same DOM cards across reply updates; rebuild only when cards or lanes change.
|
|
66
|
+
const cardLayoutKey = JSON.stringify(tasks.map(({ id, status }) => [id, status]));
|
|
67
|
+
useLayoutEffect(() => {
|
|
68
|
+
const cards = boardRef.current?.querySelectorAll<HTMLElement>("[data-chat-id]");
|
|
69
|
+
if (!cards) return;
|
|
70
|
+
const next = new Map<string, { left: number; top: number }>();
|
|
71
|
+
const reducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
72
|
+
for (const card of cards) {
|
|
73
|
+
for (const animation of card.getAnimations?.() ?? []) animation.cancel();
|
|
74
|
+
const rect = card.getBoundingClientRect();
|
|
75
|
+
const left = rect.left + (boardRef.current?.scrollLeft ?? 0);
|
|
76
|
+
const top = rect.top + (boardRef.current?.scrollTop ?? 0);
|
|
77
|
+
const id = card.dataset.chatId!;
|
|
78
|
+
const previous = previousPositions.current.get(id);
|
|
79
|
+
next.set(id, { left, top });
|
|
80
|
+
if (previous && !reducedMotion && typeof card.animate === "function") {
|
|
81
|
+
const x = previous.left - left;
|
|
82
|
+
const y = previous.top - top;
|
|
83
|
+
if (Math.abs(x) > 1 || Math.abs(y) > 1) card.animate([
|
|
84
|
+
{ transform: `translate(${x}px, ${y}px)` }, { transform: "translate(0, 0)" },
|
|
85
|
+
], { duration: 280, easing: "ease-out" });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
previousPositions.current = next;
|
|
89
|
+
}, [cardLayoutKey, completedLimit, archivedLimit]);
|
|
90
|
+
useLayoutEffect(() => {
|
|
91
|
+
if (!onVisibleTasksChange || !boardRef.current || typeof IntersectionObserver === "undefined") return;
|
|
92
|
+
onVisibleTasksChange([]);
|
|
93
|
+
const visible = new Set<string>();
|
|
94
|
+
let active = true;
|
|
95
|
+
const observer = new IntersectionObserver(entries => {
|
|
96
|
+
if (!active) return;
|
|
97
|
+
for (const entry of entries) {
|
|
98
|
+
const id = (entry.target as HTMLElement).dataset.chatId;
|
|
99
|
+
if (!id) continue;
|
|
100
|
+
if (entry.isIntersecting) visible.add(id); else visible.delete(id);
|
|
101
|
+
}
|
|
102
|
+
onVisibleTasksChange([...visible].sort());
|
|
103
|
+
});
|
|
104
|
+
const cards = boardRef.current.querySelectorAll("[data-chat-id]");
|
|
105
|
+
for (const card of cards) observer.observe(card);
|
|
106
|
+
return () => { active = false; observer.disconnect(); onVisibleTasksChange([]); };
|
|
107
|
+
}, [cardLayoutKey, completedLimit, archivedLimit, onVisibleTasksChange]);
|
|
108
|
+
|
|
39
109
|
function onPointerDown(event: ReactPointerEvent<HTMLDivElement>) {
|
|
40
110
|
if (event.pointerType !== "mouse" || event.button !== 0 || !event.isPrimary) return;
|
|
41
111
|
const target = event.target as Element;
|
|
@@ -73,7 +143,9 @@ export function TaskBoard({
|
|
|
73
143
|
}
|
|
74
144
|
}
|
|
75
145
|
|
|
76
|
-
const
|
|
146
|
+
const knownStatuses = new Set(lanes.map((lane) => lane.status));
|
|
147
|
+
const laneFor = (task: Task): TaskStatus => groupInterruptedWithWaiting && task.status === "interrupted" ? "needs_input" : knownStatuses.has(task.status) ? task.status : null;
|
|
148
|
+
const visibleLanes = lanes.filter((lane) => (lane.status !== null || tasks.some((task) => laneFor(task) === null)));
|
|
77
149
|
return (
|
|
78
150
|
<Box
|
|
79
151
|
aria-label="Task board"
|
|
@@ -92,20 +164,43 @@ export function TaskBoard({
|
|
|
92
164
|
ref={boardRef}
|
|
93
165
|
tabIndex={0}
|
|
94
166
|
>
|
|
95
|
-
{visibleLanes.map(({ status, label }) => {
|
|
167
|
+
{visibleLanes.map(({ status, label, emptyMessage }) => {
|
|
96
168
|
const matching = tasks.filter((task) => laneFor(task) === status);
|
|
97
|
-
const shown = status === "completed" ? matching.slice(0, completedLimit) : matching;
|
|
169
|
+
const shown = (status === "completed" || status === "archived") ? matching.slice(0, status === "archived" ? archivedLimit : completedLimit) : matching;
|
|
98
170
|
return (
|
|
99
|
-
<Box aria-label={`${label}, ${matching.length} tasks`} className="taskchef-board-lane" component="section" key={label}
|
|
171
|
+
<Box aria-label={`${label}, ${matching.length} tasks`} className={`taskchef-board-lane${dragging && canDrop(dragging, status) ? " taskchef-board-lane-drop-target" : ""}`} component="section" key={label}
|
|
172
|
+
onDragOver={(event) => { if (onMoveTask && draggedTask.current && acceptsDrop(draggedTask.current, status)) event.preventDefault(); }}
|
|
173
|
+
onDrop={(event) => {
|
|
174
|
+
const task = draggedTask.current;
|
|
175
|
+
draggedTask.current = null;
|
|
176
|
+
setDragging(null);
|
|
177
|
+
if (!onMoveTask || !task || !acceptsDrop(task, status)) return;
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
onMoveTask(task, status);
|
|
180
|
+
}}
|
|
181
|
+
>
|
|
100
182
|
<Box className="taskchef-board-lane-heading">
|
|
101
|
-
<
|
|
102
|
-
|
|
183
|
+
<Box className="taskchef-board-lane-title">
|
|
184
|
+
<Title order={2} size="h5">{label}</Title>
|
|
185
|
+
{status === "working" && label === "Running" && matching.length > 0 && (
|
|
186
|
+
<svg aria-label="Running chats" role="img" className="taskchef-running-spinner" width="18" height="18" viewBox="0 0 24 24" fill="none">
|
|
187
|
+
<path opacity="0.3" d="M18 12C18 8.68629 15.3137 6 12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18C15.3137 18 18 15.3137 18 12ZM20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12Z" fill="currentColor" />
|
|
188
|
+
<path d="M12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12H6C6 15.3137 8.68629 18 12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6V4Z" fill="currentColor" />
|
|
189
|
+
</svg>
|
|
190
|
+
)}
|
|
191
|
+
</Box>
|
|
192
|
+
{matching.length > 0 && <Text aria-label={`${matching.length} tasks`} c="dimmed" size="sm">{matching.length}</Text>}
|
|
103
193
|
</Box>
|
|
104
194
|
<Stack gap="sm">
|
|
105
|
-
{
|
|
106
|
-
{
|
|
107
|
-
|
|
108
|
-
|
|
195
|
+
{!loading && status === "completed" && doneNotice}
|
|
196
|
+
{shown.map((task) => <BoardCard showCardUsage={showCardUsage} draggable={!!onMoveTask} onDragStart={(event) => { if (event.target !== event.currentTarget) {
|
|
197
|
+
if (!(event.target as Element).closest("a, img")) return;
|
|
198
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
199
|
+
event.dataTransfer.setDragImage?.(event.currentTarget, event.clientX - rect.left, event.clientY - rect.top);
|
|
200
|
+
} draggedTask.current = task; setDragging(task); event.dataTransfer.effectAllowed = "move"; event.dataTransfer.setData("text/plain", task.id); }} onDragEnd={() => { draggedTask.current = null; setDragging(null); }} loadImage={loadImage} key={task.id} onOpenCodex={onOpenCodex} onOpenDetail={onOpenDetail} task={task} />)}
|
|
201
|
+
{matching.length === 0 && <Text c="dimmed" className="taskchef-board-empty" size="sm">{loading ? "Loading…" : emptyMessage ?? "No tasks"}</Text>}
|
|
202
|
+
{(status === "completed" || status === "archived") && matching.length > shown.length && (
|
|
203
|
+
<Button className="taskchef-board-more" onClick={status === "archived" ? onMoreArchived : onMoreCompleted} size="compact-sm" variant="subtle">
|
|
109
204
|
Show {Math.min(5, matching.length - shown.length)} more · {shown.length} of {matching.length}
|
|
110
205
|
</Button>
|
|
111
206
|
)}
|
|
@@ -117,7 +212,12 @@ export function TaskBoard({
|
|
|
117
212
|
);
|
|
118
213
|
}
|
|
119
214
|
|
|
120
|
-
function BoardCard({ task, onOpenCodex, onOpenDetail }: {
|
|
215
|
+
function BoardCard({ showCardUsage, task, onOpenCodex, onOpenDetail, loadImage, draggable, onDragStart, onDragEnd }: {
|
|
216
|
+
showCardUsage: boolean;
|
|
217
|
+
draggable?: boolean;
|
|
218
|
+
onDragStart?: React.DragEventHandler<HTMLElement>;
|
|
219
|
+
onDragEnd?: React.DragEventHandler<HTMLElement>;
|
|
220
|
+
loadImage?: (task: Task, url?: string) => Promise<string | null>;
|
|
121
221
|
task: Task;
|
|
122
222
|
onOpenCodex: (task: Task) => void;
|
|
123
223
|
onOpenDetail: (task: Task) => void;
|
|
@@ -125,17 +225,25 @@ function BoardCard({ task, onOpenCodex, onOpenDetail }: {
|
|
|
125
225
|
const latest = latestTurnPresentation(task);
|
|
126
226
|
const excerpt = task.status === "working" ? latest.requestSummary : latest.resultSummary;
|
|
127
227
|
const linked = hasLinkedCodexThread(task);
|
|
228
|
+
const cover = task.replyImage ?? task.promptImage;
|
|
128
229
|
return (
|
|
129
|
-
<Paper className="taskchef-board-card" component="article" px="sm" pt="sm" pb={6} withBorder>
|
|
230
|
+
<Paper draggable={draggable} onDragStart={draggable ? onDragStart : undefined} onDragEnd={onDragEnd} data-chat-id={task.id} className="taskchef-board-card" component="article" px="sm" pt="sm" pb={6} withBorder>
|
|
231
|
+
{task.observed && cover && <ReplyCover key={`${task.turnId}:${cover.url}`} task={task} image={cover} loadImage={loadImage} onOpen={() => onOpenDetail(task)} />}
|
|
130
232
|
<Title className="taskchef-board-title" order={3} size="h5">
|
|
131
233
|
<button className="taskchef-title-button" onClick={() => onOpenDetail(task)} type="button">{task.title}</button>
|
|
234
|
+
{task.observed?.unread && <span className="taskchef-chat-unread-dot" role="img" aria-label="Unread chat" />}
|
|
132
235
|
</Title>
|
|
133
|
-
<Text className="taskchef-board-project" size="xs">{task.project.name}</Text>
|
|
134
|
-
<
|
|
135
|
-
|
|
136
|
-
|
|
236
|
+
<Text className="taskchef-board-project" size="xs"><IconFolder size={14} stroke={1.5} aria-hidden /><span>{task.project.name}</span></Text>
|
|
237
|
+
{task.needsAnswer && <Tooltip label="Open chat to answer." ><Badge color="blue" size="xs" variant="light">Needs answer</Badge></Tooltip>}
|
|
238
|
+
{task.status === "interrupted" && <Badge color="orange" size="xs" variant="light">Interrupted</Badge>}
|
|
239
|
+
{task.observed ? <TurnContent task={task} compact /> : <Text component="div" className="taskchef-board-excerpt taskchef-preserve-lines" size="sm"><LinkedText task={task} text={excerpt} /></Text>}
|
|
240
|
+
<QueuedPrompts task={task} compact loadImage={loadImage} onOpen={() => onOpenDetail(task)} />
|
|
137
241
|
<Box className="taskchef-board-card-footer">
|
|
138
|
-
<
|
|
242
|
+
<CardStatusLine turnId={task.turnId} animateUsage={task.status === "working"} turnUsage={showCardUsage ? task.turnUsage : undefined} subagentCount={task.observed?.directChildCount} pullRequests={task.pullRequests} earlierPullRequest={task.earlierPullRequest} scheduled={task.scheduled} nextRunAt={task.nextRunAt} durationMs={task.observed?.latestTurnDurationMs} startedAt={task.observed && task.status === "working" ? task.observed.lastTurnEventAt : null}>
|
|
243
|
+
{task.observed && task.status === "working"
|
|
244
|
+
? <ElapsedTime tooltipEnabled={false} startedAt={task.observed.lastTurnEventAt} />
|
|
245
|
+
: <RelativeTime tooltipEnabled={false} calendar={!!task.observed} icon={task.observed ? false : undefined} label="Updated time" value={task.meaningfulUpdatedAt ?? task.updatedAt} durationMs={task.observed ? task.observed.latestTurnDurationMs ?? null : undefined} />}
|
|
246
|
+
</CardStatusLine>
|
|
139
247
|
{linked ? (
|
|
140
248
|
<button aria-label={`Open chat for ${task.title}`} className="taskchef-board-chat" onClick={() => onOpenCodex(task)} title="Open chat" type="button">
|
|
141
249
|
<IconArrowUpRight aria-hidden size={19} stroke={1.6} />
|
|
@@ -6,6 +6,8 @@ import { GitHubLinks } from "./GitHubLinks";
|
|
|
6
6
|
import { LinkedText } from "./LinkedText";
|
|
7
7
|
import { ShimmerText } from "./ShimmerText";
|
|
8
8
|
import { StatusBadge } from "./StatusBadge";
|
|
9
|
+
import { TurnContent } from "./TurnContent";
|
|
10
|
+
import { RelativeTime } from "./RelativeTime";
|
|
9
11
|
import { TaskCardStats } from "./TaskCardStats";
|
|
10
12
|
|
|
11
13
|
export function TaskCard({
|
|
@@ -29,13 +31,14 @@ export function TaskCard({
|
|
|
29
31
|
</button>
|
|
30
32
|
</Title>
|
|
31
33
|
<Stack align="flex-end" className="taskchef-card-metadata" gap={4}>
|
|
32
|
-
<StatusBadge status={task.status} />
|
|
34
|
+
<StatusBadge status={task.status} label={task.statusLabel} />
|
|
33
35
|
</Stack>
|
|
34
36
|
</Box>
|
|
35
37
|
<Text c="dimmed" mt={2} size="xs">{task.project.name}</Text>
|
|
38
|
+
{task.scheduled && <Text size="xs" c="violet">Active schedule</Text>}
|
|
36
39
|
</Box>
|
|
37
40
|
|
|
38
|
-
<Box className="taskchef-summary-grid">
|
|
41
|
+
{task.observed ? <TurnContent compact task={task} /> : <Box className="taskchef-summary-grid">
|
|
39
42
|
<Text c="dimmed" className="taskchef-field-label" size="xs">Request</Text>
|
|
40
43
|
<Text className="taskchef-preserve-lines" lineClamp={3} size="sm">
|
|
41
44
|
<LinkedText task={task} text={latest.requestSummary} />
|
|
@@ -46,11 +49,11 @@ export function TaskCard({
|
|
|
46
49
|
? <ShimmerText>{latest.resultSummary}</ShimmerText>
|
|
47
50
|
: <LinkedText task={task} text={latest.resultSummary} />}
|
|
48
51
|
</Text>
|
|
49
|
-
</Box>
|
|
52
|
+
</Box>}
|
|
50
53
|
|
|
51
54
|
<GitHubLinks task={task} />
|
|
52
55
|
<Box className="taskchef-list-card-footer">
|
|
53
|
-
<TaskCardStats task={task} />
|
|
56
|
+
{task.observed ? <RelativeTime calendar icon={false} label="Updated time" value={task.meaningfulUpdatedAt ?? task.updatedAt} /> : <TaskCardStats task={task} />}
|
|
54
57
|
<button aria-label={`Open chat for ${task.title}`} className="taskchef-board-chat" onClick={() => onOpenCodex(task)} title="Open chat" type="button">
|
|
55
58
|
<IconArrowUpRight aria-hidden size={19} stroke={1.6} />
|
|
56
59
|
</button>
|