feat(agent-memory): Memory details pane with inline edit - #6445
feat(agent-memory): Memory details pane with inline edit#6445booleanhunter wants to merge 2 commits into
Conversation
PATCH /agent-memory/:id/long-term-memory/:memoryId applies a partial update (text, memory type, topics, namespace, owner, session) through the Iris SDK's updateLongTermMemory and returns the updated record.
- Clicking a long-term memory record opens a detail pane on the right - a records | details resizable split, with selected record being highlighted. - The pane shows every field and enables editing the fields supported by Redis Agent Memory update API
Code Coverage - Backend unit tests
Test suite run success3795 tests passing in 327 suites. Report generated by 🧪jest coverage report action from c43eeee |
Code Coverage - Integration Tests
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c43eeee9cd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const [editingField, setEditingField] = useState<string | null>(null) | ||
| const [textDraft, setTextDraft] = useState('') |
There was a problem hiding this comment.
Reset edit drafts when the selected record changes
If a user starts editing record A's text and then selects record B without saving, this component remains mounted with editingField === 'text' and A's textDraft; pressing Save then calls applyUpdate with B's current record.id, overwriting B with A's draft. Reset the editing state whenever record.id changes, or key/remount the details component by the selected ID.
Useful? React with 👍 / 👎.
| <S.RecordCard | ||
| data-testid="long-term-memory-card" | ||
| data-selected={selected} | ||
| $selected={selected} | ||
| onClick={() => onSelect(memory.id)} | ||
| > |
There was a problem hiding this comment.
Make record selection keyboard-accessible
The card is now the only control that opens the details pane, but it remains a non-focusable card with only an onClick handler. Keyboard-only users therefore cannot select any memory record or access the new details and editing functionality; render this affordance as a button/link or add appropriate focus, role, and Enter/Space handling.
Useful? React with 👍 / 👎.
| &:hover { | ||
| border-color: var(--euiColorPrimary); |
There was a problem hiding this comment.
Use a semantic theme color for the card accent
In Redis UI themes that do not provide the deprecated EUI variable, var(--euiColorPrimary) is invalid, so the hover border and selected-record accent silently disappear. Use the corresponding semantic color from the styled-components theme for both states, as required by the repository's frontend rules.
AGENTS.md reference: AGENTS.md:L153-L154
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c43eeee. Configure here.
| record.userId ?? '', | ||
| (next) => ({ userId: next.trim() }), | ||
| 'No owner', | ||
| )} |
There was a problem hiding this comment.
Owner clear rejected by API
Medium Severity
The owner field is edited like namespace and sessionId, including a No owner empty state, and clearing it sends userId: ''. The update DTO only allows userId with length 1–64, while those other fields explicitly allow empty strings to clear. Clearing owner therefore fails validation and surfaces an error instead of updating.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c43eeee. Configure here.
| aria-label="Save text" | ||
| data-testid="ltm-text-apply" | ||
| onClick={() => applyUpdate({ text: textDraft })} | ||
| /> |
There was a problem hiding this comment.
Empty text update fails validation
Medium Severity
The text apply control always sends { text: textDraft } with no empty check, while the update DTO requires text length 1–50000. Saving a blank draft is rejected by the API. The UI also shows a No text placeholder, which suggests empty text is a valid state.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c43eeee. Configure here.
| testid="ltm-details-delete" | ||
| handleDeleteItem={() => | ||
| dispatch(deleteLongTermMemoryAction(endpointId, record.id)) | ||
| } |
There was a problem hiding this comment.
Delete leaves selection open
Medium Severity
Deleting from the details pane only dispatches deleteLongTermMemoryAction without clearing selectedRecordId or the delete popover. The pane stays open on the deleted record until a refetch succeeds and prunes selection. If the delete succeeds but the follow-up fetch fails, the removed record can remain visible and editable.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c43eeee. Configure here.
Code Coverage - Frontend unit tests
Test suite run success8161 tests passing in 889 suites. Report generated by 🧪jest coverage report action from c43eeee |


Note
Medium Risk
Adds a write path that mutates long-term memory records (text, owner, session, topics) via a new PATCH API. Scope is limited to the agent-memory inspector and existing session-bound clients.
Overview
Lets users inspect and edit a long-term memory record from the explorer. Clicking a record opens a resizable details pane (list | details) with the selected card highlighted.
Adds
PATCH /agent-memory/:id/long-term-memory/:memoryIdwith a validated partial DTO (text, type, topics, namespace, owner, session). The cloud client mapsuserIdto SDKownerIdand returns the updated record, which replaces the list item in place.The details pane supports inline edits (textarea for text,
EditableInputfor the rest), copy id, and delete. Selection is cleared when the record is filtered out or deleted.Reviewed by Cursor Bugbot for commit c43eeee. Bugbot is set up for automated code reviews on this repo. Configure here.