docs(agents): add entity display name rules for workflows#4665
docs(agents): add entity display name rules for workflows#4665mmabrouk wants to merge 4 commits into
Conversation
…er101 docs: add unfitcoder101 as a contributor for bug
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR adds a documentation section to ChangesEntity display names documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| - 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. |
There was a problem hiding this comment.
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.
Context
Workflows, variants, and revisions all carry a
namecolumn, 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.mdthat establishes:workflowMolecule.selectors.artifactName(entityId).variant.namethenvariant.slug, resolved through the variants list, never from a revision's fields.revision.nameis dead for display: never read it as a label, never write entity names into it; revisions contribute onlyversionandmessage..nameread 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.