Add interactive integration-flows doc to Dev Tools (/devtools/flows)#2075
Merged
Conversation
A JSON-driven visual map of PortOS integrations: client/public/flows.html renders ~60 components in layered columns and traces 10 end-to-end flows (create image, start a story, voice command, CoS agent run, PM2, shell, backup, peer sync, self-update, scheduled tasks) with per-hop transport and payload annotations. Driven entirely by client/public/flows.json; an integrity test keeps node references and file paths honest. Hosted at /devtools/flows (iframe wrapper, deep-linkable ?flow= param) with an open-full-screen escape to the standalone doc.
…ocket event names in flows doc Same-column hops (e.g. Start a Story → Story Builder) anchored source-left/ target-right and swept across the column's node boxes; they now loop out the right side. Two flows.json hops named events that never cross the wire (jobs:executed, sync:applied, peers:updated, tasks:changed) — relabeled to the real client-facing events (cos:tasks:*:changed, sharing:manifest-processed, sharing:inbox-updated) so grepping a hop label always finds real code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
client/public/flows.html(standalone, dependency-free) renders ~60 components in layered columns (client pages → client services → routes & sockets → server services → server lib → data stores → external systems) and traces 10 end-to-end flows — Create Image, Start a Story, Voice Command, CoS Agent Run, Scheduled Task/Autopilot, Start/Stop App (PM2), Shell Session, Run Backup, Peer Sync, Self-Update — with per-hop transport (HTTP / SSE / Socket.IO / EventEmitter / spawn / file+DB I/O) and payload annotations.?flow=), keyboard-accessible, and mobile-responsive.client/public/flows.json— adding a flow is a data-only change.client/src/lib/flowsDoc.test.jspins the contract: unique ids, resolvable node/transport references, renderer-required fields, and on-disk existence of every referenced source file (so refactors can't silently rot the doc)./devtools/flows(FlowsDoc.jsxiframe wrapper; the page's?flow=param stays the source of truth via a bidirectional postMessage contract), registered in the Dev Tools sidebar, ⌘K, and voice nav; "Open full screen" opens the raw doc in a new tab.Test plan
client/src/lib/flowsDoc.test.js— 7 integrity tests over flows.json (runs in both client vitest and the server CI's node-env glob).?flow=deep link, and prod-mode serving fromclient/dist.