Skip to content

fix(web): make raw memory type non-removable in multi-select - #17119

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
euvre:fix/memory-raw-type-non-removable
Jul 20, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
euvre:fix/memory-raw-type-non-removable

Conversation

@euvre

@euvre euvre commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

In the memory configuration dialogs, the raw memory type is required (form validation rejects submissions that don't include it), but the MultiSelect still rendered a remove ("x") button on the raw badge, allowing users to deselect it via the badge, the dropdown, clear-all, or Backspace.

This PR marks the raw option as disabled in MemoryOptions (web/src/pages/memories/constants/index.tsx). The existing option-level disabled handling in MultiSelect then:

  • hides the remove button on the raw badge,
  • prevents toggling it off in the dropdown,
  • preserves it on clear-all and Backspace (preserveDisabledValues).

Both the memory creation dialog (createMemoryFields) and the memory settings form (memory-model-form.tsx) reuse MemoryOptions, so the fix applies to both.

Mark the raw memory type option as disabled in MemoryOptions so the
MultiSelect no longer renders a remove button for it and preserves it
across clear/backspace interactions, matching the form validation that
requires raw to always be selected.
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. 🧰 typescript Pull requests that update Typescript code labels Jul 20, 2026
@euvre euvre added the ci Continue Integration label Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9ea3822f-ed25-4940-b185-15fb2052f829

📥 Commits

Reviewing files that changed from the base of the PR and between aff9ff6 and 799cf7f.

📒 Files selected for processing (1)
  • web/src/pages/memories/constants/index.tsx

📝 Walkthrough

Walkthrough

The memory options configuration marks memories.raw as disabled, preventing its selection in the UI.

Changes

Memory option availability

Layer / File(s) Summary
Disable raw memory option
web/src/pages/memories/constants/index.tsx
The memories.raw option now includes disabled: true.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a bunny hopping light,
Raw memories leave the sight.
One small flag now guards the door,
No raw selection anymore.
Hop, hop—configuration right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: making the raw memory option non-removable in the web multi-select.
Description check ✅ Passed The description follows the template's Summary section and explains the bug, fix, and affected forms.
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.

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.

@euvre
euvre requested a review from wangq8 July 20, 2026 10:29

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review: PR #17119 — Make raw memory type non-removable in multi-select

What it does

Adds disabled: true to the raw option in MemoryOptions so the existing MultiSelect component:

  • Hides the remove (x) button on the raw badge
  • Prevents toggling it off in the dropdown
  • Preserves it on clear-all / Backspace

Analysis

  • Single-line change in the source of truth (web/src/pages/memories/constants/index.tsx). Both the creation dialog and the settings form reuse MemoryOptions, so the fix covers both without duplication.
  • The disabled property is already handled by the MultiSelect component (preserveDisabledValues), so this is a clean, minimal fix — no new logic needed.
  • Correctly addresses the UX bug: raw is a required memory type that form validation enforces, so the UI should not allow deselecting it.

Verdict

✅ LGTM — minimal, correct, well-covered.

@wangq8
wangq8 merged commit 8c18c44 into infiniflow:main Jul 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files. 🧰 typescript Pull requests that update Typescript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants