Skip to content

Add interactive integration-flows doc to Dev Tools (/devtools/flows)#2075

Merged
atomantic merged 3 commits into
mainfrom
feature/integration-flows-doc
Jul 2, 2026
Merged

Add interactive integration-flows doc to Dev Tools (/devtools/flows)#2075
atomantic merged 3 commits into
mainfrom
feature/integration-flows-doc

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • New JSON-driven visual documentation of PortOS integrations: 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.
  • Clicking a flow dims everything else, draws numbered hops with transport-coded edges, auto-scrolls to the flow, and lists each hop's payload; clicking a node shows its file, role, and the flows it appears in. Selection is deep-linkable (?flow=), keyboard-accessible, and mobile-responsive.
  • All data lives in client/public/flows.json — adding a flow is a data-only change. client/src/lib/flowsDoc.test.js pins 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).
  • Hosted at /devtools/flows (FlowsDoc.jsx iframe 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).
  • Full client (3117) and server (15659) suites pass; nav-manifest shape and palette tests cover the new entry.
  • Verified rendering headlessly (Chrome screenshots): overview, per-flow highlighting with hop badges, same-column loops, embed mode (header hidden), mobile 420px layout, ?flow= deep link, and prod-mode serving from client/dist.

atomantic added 3 commits July 2, 2026 11:26
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.
@atomantic atomantic merged commit ee6f5eb into main Jul 2, 2026
2 checks passed
@atomantic atomantic deleted the feature/integration-flows-doc branch July 2, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant