Skip to content

chore(frontend): polish the draft-run references fix (doc accuracy and a test guard)#5179

Merged
mmabrouk merged 1 commit into
big-agentsfrom
fix/draft-run-references-polish
Jul 9, 2026
Merged

chore(frontend): polish the draft-run references fix (doc accuracy and a test guard)#5179
mmabrouk merged 1 commit into
big-agentsfrom
fix/draft-run-references-polish

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Jul 9, 2026

Copy link
Copy Markdown
Member

Follow-up to #5163. A post-merge review found three accuracy gaps, all fixed here.

What was wrong

  • README.md stated the debunked mechanism. It still said a successful commit is what flips the panel into the unsaved state. The project's own research.md (rewritten in [#5162] fix(frontend): forward variant references on draft playground runs #5163) shows the real rule: isDirty means the loaded revision carries unsaved edits, from a user edit or a missed data-committed-revision repoint. The README now matches the research.
  • A code comment cited a file that does not exist. The gate comment in agentRequest.ts pointed at services/oss/src/agent/tracing.py. The is_draft = revision is None logic actually lives in sdks/python/agenta/sdk/agents/tracing.py:165. The comment now points there.
  • One fallback path had no test. A dirty run whose references contain only application_revision must collapse to references: null (the empty-object fallback). A new test pins that. The three key-absence assertions were also strengthened from toBeUndefined() to not.toHaveProperty(...), which is the actual wire contract (key absent, not key undefined).
  • research.md's self-citations were refreshed to the post-fix line numbers, and quotes of the old gate are now marked as the code before the fix instead of carrying stale line references.

Tests

pnpm run test:unit in web/packages/agenta-playground: 197 passed (196 baseline + 1 new). pnpm lint-fix clean.

https://claude.ai/code/session_01CSTSEXSe4DDhoXCFjZpZ5W

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 9, 2026
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jul 9, 2026 3:11pm

Request Review

@dosubot dosubot Bot added documentation Improvements or additions to documentation tests labels Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ab0ddd46-8e35-4c9b-82fe-661972039f00

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/draft-run-references-polish

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mmabrouk mmabrouk added the lgtm This PR has been approved by a maintainer label Jul 9, 2026
@mmabrouk mmabrouk merged commit 7264d79 into big-agents Jul 9, 2026
16 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant