mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04:45:33 -08:00
Add the web console Notepad and shared skill tables, release v2.10.0
AI Assisted
This commit is contained in:
1 parent
124beb46db
commit
f8b54ef708
59 files changed
+12549
-321
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// Plan2Code Web Console - the hop rule.
|
||||
//
|
||||
// Which hops from one workflow to another start the new skill on a clean
|
||||
// page. One rule, called by both sides that act on it: the server
|
||||
// (cmd-open.mjs blanks the stored session and drops the staged draft) and the
|
||||
// page (screens/core.js drops what it kept for the last skill: the question
|
||||
// on screen, the open tab, anything staged against its item ids). No imports
|
||||
// and no DOM access: nothing runs at load.
|
||||
|
||||
// True when a hop from workflow `from` to workflow `to` starts clean:
|
||||
// - a launch from the dashboard menu gets a clean page, not the last
|
||||
// skill's questions and tabs under its own name;
|
||||
// - going back to the dashboard clears the last skill;
|
||||
// - Git counts as a launch from anywhere: Commit it now on a finished
|
||||
// screen and Changelog's "Commit this now?" both stand in for its
|
||||
// dashboard card, and a finish left behind would keep the page on the old
|
||||
// ending above the new board.
|
||||
// A skill run inline from another (a quick task's review) never switches
|
||||
// workflow, so it keeps the page; nor does a resume into the same workflow.
|
||||
export function startsClean(from, to) {
|
||||
if (typeof from !== "string" || typeof to !== "string" || !from || !to || from === to) return false;
|
||||
return from === "dashboard" || to === "dashboard" || to === "git";
|
||||
}
|
||||
Reference in new issue
Block a user