mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Let Diagnose start from a Notebook tab
AI Assisted
This commit is contained in:
1 parent
9a23b15fc9
commit
92d4d880bf
8 files changed
+18
-9
No files matched your search
@@ -114,7 +114,7 @@ const isFile = (p) => {
|
||||
|
||||
// The workflows a tab can be sent to from the dashboard, and the spec a Revise
|
||||
// plan send names.
|
||||
export const SENT_WORKFLOWS = ["pathfinder", "plan", "quick-task", "revise-plan"];
|
||||
export const SENT_WORKFLOWS = ["pathfinder", "plan", "quick-task", "revise-plan", "diagnose"];
|
||||
const SENT_SPEC_RE = /^specs\/[A-Za-z0-9._-]+$/;
|
||||
|
||||
// A tab's `sent` record as stored, or null when it does not hold up.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
## The bug
|
||||
|
||||
An argument that already describes the bug skips the cards it answers. Otherwise one `--wait` batch, no `templates`:
|
||||
An argument that already describes the bug skips the cards it answers. Otherwise one `--wait` batch, no `templates`; the first card carries `"fill":"note"` (a Notebook tab fills it):
|
||||
|
||||
```jsonc
|
||||
{"title":"Diagnose a bug","headline":{"stage":"The bug","cleared":0,"total":3},"items":[{"id":"bug","kind":"text","title":"What is wrong","body":"The bug, in a sentence or two."},{"id":"expected","kind":"text","title":"Expected and actual","required":false,"body":"What should happen, and what happens instead."},{"id":"see-it","kind":"text","title":"How to see it","required":false,"body":"The steps, command, page or input that shows it, and since when if known."}]}
|
||||
{"title":"Diagnose a bug","headline":{"stage":"The bug","cleared":0,"total":3},"items":[{"id":"bug","kind":"text","title":"What is wrong","fill":"note","body":"The bug, in a sentence or two."},{"id":"expected","kind":"text","title":"Expected and actual","required":false,"body":"What should happen, and what happens instead."},{"id":"see-it","kind":"text","title":"How to see it","required":false,"body":"The steps, command, page or input that shows it, and since when if known."}]}
|
||||
```
|
||||
|
||||
A follow-up the answers leave open is a new card with a new id. A skipped card is no answer: work from the rest, never guess the missing steps, and ask again when you cannot show someone else the bug without it.
|
||||
|
||||
@@ -715,12 +715,14 @@ const NOTE_FRESH_CARDS = new Set(["plan2code-0-pathfinder", "plan2code-1-plan",
|
||||
|
||||
/**
|
||||
* Whether a lit card's confirm pane offers the Notebook switch: Pathfinder,
|
||||
* Plan and Quick Task on Start fresh (no spec picked), and Revise plan on a
|
||||
* picked spec with no plan change brief waiting (a waiting brief is what that
|
||||
* revision is about). Never on a grayed card, never on any other card.
|
||||
* Plan and Quick Task on Start fresh (no spec picked), Diagnose whenever it is
|
||||
* lit (it launches untargeted, so a picked spec does not matter), and Revise
|
||||
* plan on a picked spec with no plan change brief waiting (a waiting brief is
|
||||
* what that revision is about). Never on a grayed card, never on any other card.
|
||||
*/
|
||||
export function noteSwitchShows(entry, scan, sel) {
|
||||
if (!entry || !cardAvailability(entry, scan, sel).on) return false;
|
||||
if (entry.skill === "plan2code-diagnose") return true;
|
||||
if (NOTE_FRESH_CARDS.has(entry.skill)) return !sel;
|
||||
if (entry.skill === "plan2code-1b-revise-plan") return Boolean(sel) && sel.planChange !== true;
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user