RI-8222: Inline value edit for array elements#6115
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87fe6ff924
ℹ️ 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".
Code Coverage - Integration Tests
|
Code Coverage - Frontend unit tests
Test suite run success7434 tests passing in 836 suites. Report generated by 🧪jest coverage report action from 87fe6ff |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c91de78759
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 297b7b6a4c
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63900b56c6
ℹ️ 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".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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 2afd349. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2afd3490c8
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3b64fab65
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08f015b52d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d8c4c0d5a
ℹ️ 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".
Use the selected key's name for ARSET instead of the array slice's `data.keyName`, which is only set after a View range/scan — so edits from the Search tab (or before View loads) no longer POST an empty key. Patch `search.data` alongside `data.elements` in the optimistic update so Search-tab edits reflect immediately. Re-enable the key-header refresh on unmount and key change so an open editor can't leave it stuck disabled. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Track an in-flight `updating` flag so the value editor is disabled and the key-header refresh stays paused until the ARSET settles — a concurrent edit or refresh can no longer race the optimistic patch. Drive the shared refresh flag from the visible tab only: an inactive table reflects just the global write and abandons its open editor when hidden or unmounted, so an editor left open in a background tab (or when switching to a tab without a table) can't leave refresh stuck disabled. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Skip the optimistic ARSET patch when the user switched to another key before the POST resolved, so a late success can't overwrite a same-index row in the newly selected key. Split the refresh-disabled effect so only the active tab's table reacts to its editor; an inactive table reflects just the global write and never re-enables refresh while the visible table has an editor open. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SearchTab now requires `isActive`; the spec's render helper was missing it (TS2741). References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Locks in that opening an inline edit in the active array table keeps the key-header refresh paused even when the other tab's table is mounted (hidden) — the inactive table's effect reacts only to isActive/updating, not the active table's editor. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tie the `updating` lock release to the latest edit via a request token, so a stale ARSET completing after a key switch (which resets the slice and lets a newer edit start) can't release the lock for the newer in-flight write. Also clear any stored AROP result on a successful edit, so returning to the still-mounted Aggregate tab doesn't show a number computed before the change. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The stale-key guard on a successful ARSET used `===`, but key names are RedisResponseBuffers and Redux can swap the instance for the same key (e.g. a key-info refetch) while the POST is in flight. Reference equality would then wrongly skip the optimistic patch, leaving the old value on screen despite a successful write. Compare by bytes (isEqualBuffers), matching how key identity is checked elsewhere; strict equality is kept for plain-string names. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editing a value to a different byte length changes the key's Size even though ARLEN/ARCOUNT don't. The success path only stamped lastRefreshTime, so the header kept the old size while looking freshly refreshed. Dispatch refreshKeyInfoAction (which refetches info and stamps the time) instead, matching the List/Hash/String value-edit thunks. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The View/Search Run/Reset controls were gated only by their own readiness, so a user could reload the table while a value editor was open or an ARSET was in flight — losing unsaved input or racing the optimistic patch. Gate both forms on the selected key's `isRefreshDisabled` (which the active table already sets to `editingIndex !== null || updating`), the same signal that pauses the header refresh. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Block opening an inline edit while a range/scan request is in flight (feed the table loading state into the edit lock), so a late refresh response can't overwrite the optimistic patch with pre-edit rows. On a successful edit, also abort any in-flight AROP before clearing the stored aggregate — otherwise its late success would repopulate the result that was just cleared. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generalise the edit lock so it pauses while a range/scan OR search request is in flight, read from the slice rather than the per-tab `loading` prop. This covers the cross-tab case the prop missed (a search loading on the hidden Search tab while editing in View, or vice-versa), so no read that writes data.elements/search.data can be in flight across an edit and overwrite the optimistic patch. Combined with the existing edit-time lock on the query forms and header refresh, this closes the edit-vs-read race class. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0d8c4c0 to
887e383
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 887e3832e5
ℹ️ 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".
Feeding `loading` only into `isEditDisabled` gated opening an edit, but EditableTextArea ignores that once editing — so a range/scan/search read that started just before the refresh-disabled flag took effect could be Saved into, and its success would overwrite the optimistic patch. Also gate the editor's Save (`isLoading`) on the read, closing the already-open-editor window. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

What
Makes a populated value editable in place in the Array View table. Clicking a value opens the shared inline editor
(
EditableTextArea, same as List); saving issuesARSETvia a newupdateArrayElementActionthunk with an optimistic value swap. Empty slots stayread-only and the index is never editable (delete + re-set instead).
Screen.Recording.2026-06-25.at.13.46.39.mov
Note
Medium Risk
Introduces live Redis writes and optimistic UI patching with several race/tab edge cases; mitigations are tested but wrong-key or stale-response bugs would corrupt displayed data.
Overview
Adds in-place editing for populated array slots in View and Search tables (same
EditableTextAreapattern as List). Saving callsarray/set-elementvia newupdateArrayElementAction, with an optimistic value update in bothdata.elementsandsearch.data.Empty slots stay read-only. Edits are gated on format/compression/unprintable bytes, and blocked while range/search reads or an ARSET is in flight so late fetches cannot stomp the patch. Only the active tab drives header refresh lock; hidden mounted tables abandon editors and release refresh correctly.
On success the thunk clears/aborts aggregate (AROP), refetches key info (size), and uses request tokens + key matching so overlapping or stale writes do not unlock the UI or patch the wrong key.
Reviewed by Cursor Bugbot for commit 35363c2. Bugbot is set up for automated code reviews on this repo. Configure here.