fix(editor): Truncate long AIA context chips - #37878
Conversation
PR review overviewBased on ownership of the 2 changed files in this PR:
|
Bundle ReportChanges will increase total bundle size by 5.23kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: editor-ui-esmAssets Changed:
Files in
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Fixes long AI context chip labels overflowing by adding ellipsis truncation with a hover tooltip, and refines tag styling to support it. Bounded visual change with no broader impact.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Confidence score: 4/5
- In
packages/frontend/editor-ui/src/features/ai/instanceAi/components/InstanceAiInput.vue, removingN8nTooltipleaves ellipsized.contextChipTextlabels unreadable in full, which can make selected context ambiguous; retain an accessible way to view the complete label.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/frontend/editor-ui/src/features/ai/instanceAi/components/InstanceAiInput.vue">
<violation number="1">
P2: With the N8nTooltip removed, a long chip label that is truncated with an ellipsis (`.contextChipText` sets `text-overflow: ellipsis`) can no longer be read in full — the PR's goal is precisely to truncate long labels, so there is now no way for a user to see the full text of a truncated chip. Re-add a `title` attribute or tooltip to reveal the full label, or confirm this is intentional.</violation>
</file>
Shadow auto-approve: would not auto-approve because issues were found.
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
| @@ -1,7 +1,7 @@ | |||
| <script lang="ts" setup> | |||
There was a problem hiding this comment.
P2: With the N8nTooltip removed, a long chip label that is truncated with an ellipsis (.contextChipText sets text-overflow: ellipsis) can no longer be read in full — the PR's goal is precisely to truncate long labels, so there is now no way for a user to see the full text of a truncated chip. Re-add a title attribute or tooltip to reveal the full label, or confirm this is intentional.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/frontend/editor-ui/src/features/ai/instanceAi/components/InstanceAiInput.vue, line 579:
<comment>With the N8nTooltip removed, a long chip label that is truncated with an ellipsis (`.contextChipText` sets `text-overflow: ellipsis`) can no longer be read in full — the PR's goal is precisely to truncate long labels, so there is now no way for a user to see the full text of a truncated chip. Re-add a `title` attribute or tooltip to reveal the full label, or confirm this is intentional.</comment>
<file context>
@@ -576,31 +576,29 @@ const resizable = computed(() => {
- :aria-label="i18n.baseText('generic.close')"
- data-test-id="instance-ai-handoff-context-chip-dismiss"
- @click.stop="emit('dismiss-context-chip')"
+ <N8nTag :text="props.contextChip.label" :clickable="false" size="lg">
+ <template #tag>
+ <span :class="$style.contextChipContent">
</file context>
Summary
N8nTagtext to shrink and use an optional maximum width.How to test
Related Linear tickets, Github issues, and Community forum posts
AI-2752
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)