fix(context-chat): remove dead deselect button from read-only source chips - #659
MichelleAntunes wants to merge 1 commit into
Conversation
…list The sources list reused NcSelect (a multi-select form component) purely for its icon+avatar+label chip styling. In multiple mode, vue-select always renders a deselect (x) button on each chip, and NcSelect exposes no prop to disable it. Since this list is read-only (not an actual selection to edit), the button did nothing when clicked -- a non-functional, misleading control that also stayed focusable and screen-reader-exposed via its title attribute. Replace NcSelect with NcChip (:no-close="true"), a component purpose-built for read-only chip display and available since @nextcloud/vue 8.23.0. Scoped styles are adjusted to keep the original bordered, scrollable list container. Signed-off-by: MichelleAntunes <miichelleantunes@outlook.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe sources section replaces its read-only Priority: ⚪ Not assessed Merge Risk: ⚪ Minimal · up to The source display changes to read-only link chips without a confirmed new behavior problem. The change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
src/components/ContextChat/ContextChatOutputForm.vuetypescript-eslint does not support TS 7.0. Oops! Something went wrong! :( ESLint: 10.11.0 Error: typescript-eslint does not support TS 7.0. 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 |
Problem
Each source document shown under a Context Chat answer displays an "×" (deselect) button that does nothing when clicked — the list is a read-only display of referenced sources, not an editable selection.
Root cause
ContextChatOutputForm.vuereusesNcSelect(a multi-select form component) purely for its icon+avatar+label chip styling. Inmultiplemode, the underlyingvue-selectlibrary always renders a deselect button on each selected chip, andNcSelectexposes no prop to disable it. The button stays in the DOM, is keyboard-focusable, and is exposed to screen readers via itstitleattribute — a non-functional control that also carries a minor accessibility cost.Fix
Replace
NcSelectwithNcChip(:no-close="true"), a component purpose-built for read-only chip display, available since@nextcloud/vue8.23.0 (this file predates that release, which is likely why it was never revisited). Scoped styles are adjusted to keep the original bordered, scrollable list container and chip appearance.Testing
Manually verified in a local Nextcloud AIO instance: sources render with icon + name as before, no deselect button in the DOM (checked via DevTools), and the container keeps its original bordered/scrollable look.


🤖 AI (if applicable)