Skip to content

docs(agents): add entity display name rules for workflows#4665

Open
mmabrouk wants to merge 4 commits into
release/v0.103.3from
docs/entity-display-name-rules
Open

docs(agents): add entity display name rules for workflows#4665
mmabrouk wants to merge 4 commits into
release/v0.103.3from
docs/entity-display-name-rules

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Context

Workflows, variants, and revisions all carry a name column, and we keep shipping bugs by reading the wrong one: evaluators showing "default" instead of their real name (#4634, #4662), and SDK-created apps showing "--" or hex slugs. The frontend conventions file had no rule for which field is the display name.

What this adds

A new "Entity display names (workflows, variants, revisions)" section in web/AGENTS.md that establishes:

  • The entity display name comes from the workflow artifact, read via workflowMolecule.selectors.artifactName(entityId).
  • A variant label comes from variant.name then variant.slug, resolved through the variants list, never from a revision's fields.
  • revision.name is dead for display: never read it as a label, never write entity names into it; revisions contribute only version and message.
  • The label depends on entity kind: evaluators show artifact name + version, applications in comparison/evaluation contexts show the variant label + version.
  • Any .name read off a revision entity used as a display label is a review blocker.

This encodes the decisions made while fixing the evaluator-name bug series so the same class of bug does not regress through review.

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

vercel Bot commented Jun 12, 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 Jun 12, 2026 11:28am

Request Review

@dosubot dosubot Bot added the documentation Improvements or additions to documentation label Jun 12, 2026
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added frontend documentation detailing display naming conventions for workflows, variants, and revisions.

Walkthrough

This PR adds a documentation section to web/AGENTS.md defining which name fields should be used for displaying workflows, variants, and revisions. It specifies correct name selectors (artifact.name, variant.name/slug via workflow_variant_id) and explicitly prohibits use of revision.name as a display label.

Changes

Entity display names documentation

Layer / File(s) Summary
Entity display names documentation
web/AGENTS.md
New section documents sanctioned name fields for display across workflows, variants, and revisions, explicitly prohibiting revision.name and directing to correct selectors by entity kind.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • Agenta-AI/agenta#4634: Documents the same display-name rule for workflows and variants, establishing the convention that artifact names (not revision.name) should be used for rendering workflow labels.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs(agents): add entity display name rules for workflows' accurately describes the main change: adding documentation about entity display name conventions in the agents module.
Description check ✅ Passed The description clearly explains the context (bug fixes related to reading wrong name fields), what is being added (new documentation section with specific rules), and how it prevents regression.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/entity-display-name-rules

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4dd85bac-1528-47e5-8006-fb649429e45c

📥 Commits

Reviewing files that changed from the base of the PR and between a2e9150 and 74189e3.

📒 Files selected for processing (1)
  • web/AGENTS.md

Comment thread web/AGENTS.md
Comment on lines +286 to +301
- The entity display name lives on the workflow ARTIFACT: `artifact.name`, falling back
to its slug. Use `workflowMolecule.selectors.artifactName(entityId)`; it accepts a
revision id or a workflow id.
- A variant label comes from the VARIANT: `variant.name`, then `variant.slug`. Resolve it
through the variants list by `workflow_variant_id`. Never label a variant from a
revision's fields.
- `revision.name` is dead for display. Never read it as a label and never write entity
names into it. Revisions contribute only `version` (the vN tag) and `message`. Reason:
UI-created revisions carry the variant name ("default") and SDK-created revisions carry
no name at all.
- Pick the label by entity kind. Evaluators and other entities that do not use variants
display artifact name + version. Applications in comparison or evaluation contexts
display the variant label + version.
- Review blocker: any `.name` read off a revision entity (e.g. `selectors.data(id)?.name`
or a revision row's `name`) used as a display label. Point to the sanctioned selectors
above instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Reword this as a migration rule, not current state.

The new text says revision.name is dead for display, but the provided code still renders it in EntityEvaluatorSelector and in the revision selection relation. As written, this will read like the codebase already complies when it does not yet.

@mmabrouk mmabrouk changed the base branch from main to release/v0.103.3 June 12, 2026 11:38
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jun 12, 2026
@mmabrouk mmabrouk requested a review from ardaerzin June 12, 2026 11:38
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 size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants