Skip to content

fix(dart-client): export the SSE parser, keep mutation bodies out of devtools - #116

Merged
juicycleff merged 3 commits into
mainfrom
fix/dart-client-sse-devtools
Nov 6, 2026
Merged

juicycleff merged 3 commits into
mainfrom
fix/dart-client-sse-devtools

Conversation

@juicycleff

Copy link
Copy Markdown
Contributor

You can now import SseParser and SseEvent from package:forge_client/forge_client.dart. They only lived in src/sse.dart before, so the Loomplane app reached into the package's internals to follow an agent task's event stream, with an implementation_imports ignore on top.

Devtools also stops keeping mutation bodies. tagContextJson in devtools/explain.dart turned a call's whole TagContext into text, body included, and the mutation log, argsKey and the inspector all go through it. So a mutation carrying an API key or a secret value sat in the devtools ring in debug and profile builds. Release builds compile devtools out, which means shipped apps were never exposed. It now keeps the path and the query only, the rule devtools/requests.dart already follows for requests.

One thing this doesn't touch: MutationLog.tags still holds the resolved invalidation tags, so a template that reads from the body (Order:{body.id}) puts that value in the tags, same as before.

Tested with fvm dart test on Flutter 3.47.5: forge_client 1332 passed (26 skipped), forge_client_devtools 194, forge_client_flutter 218. dart analyze and dart format are clean. The new test sends a mutation whose body holds a marker string and checks it never shows up in the log, argsKey, the explain output or the snapshot, while the operation and its path params still do. Two older tests in log_test.dart assumed the body was in MutationLog.args, so they changed with it.

Devtools recorded argsKey(args), which included the request body, so a
mutation carrying an API key sat in the in-memory ring in debug and
profile builds. tagContextJson now keeps path and query only, the same
rule requests.dart already follows. That covers the mutation log,
explain output and the inspector.
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
forge Ready Ready Preview Nov 6, 2026 4:21am UTC

Request Review

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Conventional Commits Validation

PR Title: valid
Commits: all 2 follow conventional format

forge_client now exports SseEvent and SseParser, so a schema with either
name would be ambiguous next to it. The generator renames such a schema
like any other forge_client export.
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Conventional Commits Validation

PR Title: valid
Commits: all 3 follow conventional format

@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@juicycleff
juicycleff merged commit 941cbf0 into main Nov 6, 2026
45 checks passed
@juicycleff
juicycleff deleted the fix/dart-client-sse-devtools branch November 6, 2026 04:44

This branch was successfully deployed

1 active deployment
Preview — 1d5fea13 Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant