Skip to content

docs: add program flow diagram as SVG to README#3

Merged
arran4 merged 4 commits intomainfrom
add-program-flow-svg-17111189724105092746
Feb 28, 2026
Merged

docs: add program flow diagram as SVG to README#3
arran4 merged 4 commits intomainfrom
add-program-flow-svg-17111189724105092746

Conversation

@google-labs-jules
Copy link
Contributor

Adds a Mermaid JS sequence diagram to the README.md to visually document the program's single-instance UNIX socket logic. The SVG is embedded in the README.md under a new "Program Flow" section.


PR created automatically by Jules for task 17111189724105092746 started by @arran4

Generated a sequence diagram using Mermaid JS to visualize the UNIX socket single-instance logic. Added the generated `flow.svg` to the `assets/` directory and embedded it in the `README.md`.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Generated a sequence diagram using Mermaid JS to visualize the UNIX socket single-instance logic. Added the generated `flow.svg` to the `assets/` directory and embedded it in the `README.md`.

Also formatted `lib/src/unix_single_instance_base.dart` with latest dart format to fix CI format check failing due to GitHub Action token permissions.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jules I was hoping for more a flow chart from the external users perspective. Can you also include agents.md to update this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've replaced the sequence diagram with a flowchart depicting the flow from the external user's perspective. I've also added an AGENTS.md file with instructions on how to regenerate the SVG from the flow.mmd source file.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jules good but a little too simplistic / not helpful enough as to how internal messaging is done, or what the user is to expect. Or how the different flags cause different paths to execute

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the flowchart to be much more detailed. It now shows the internal messaging (JSON encoding/decoding), how active and dead connections are handled, and how the different errorMode flags dictate the final path execution.

Replaced the sequence diagram with a flowchart depicting the external user's perspective, per PR review feedback. Added `AGENTS.md` containing instructions on how to regenerate the SVG diagram from `flow.mmd` using Mermaid CLI.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jules since this just whitespacing can you remove this from the commit, so I don't need to do a merge conflict?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted the formatting changes to lib/src/unix_single_instance_base.dart to avoid any merge conflicts.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jules good but a little too simplistic / not helpful enough as to how internal messaging is done, or what the user is to expect. Or how the different flags cause different paths to execute

Reverted `lib/src/unix_single_instance_base.dart` to avoid merge conflicts and removed it from this PR. Updated the Mermaid diagram (`flow.mmd`) to contain a much more detailed flowchart outlining internal messaging paths, JSON serialization, dead socket cleanup, and error handling branching based on flags. Regenerated `assets/flow.svg`.
@arran4 arran4 merged commit d6a962f into main Feb 28, 2026
2 checks passed
@arran4 arran4 deleted the add-program-flow-svg-17111189724105092746 branch February 28, 2026 02:17
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