RI-8222 Add "Add element" to the array View tab#6129
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: fe86d4eb36
ℹ️ 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".
b644fec to
a347afe
Compare
fe86d4e to
af510ae
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af510ae25e
ℹ️ 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
|
af510ae to
4dbfb8e
Compare
a347afe to
05cd432
Compare
4dbfb8e to
94043f0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94043f0ee3
ℹ️ 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".
94043f0 to
8e5b8c9
Compare
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 8e5b8c9. Configure here.
| setValue('') | ||
| setIndex('') | ||
| closePanel() | ||
| } |
There was a problem hiding this comment.
Missing add success telemetry
Low Severity
After a successful append or set-element, handleSuccess clears the form and closes the panel but never emits the browser “key value added” telemetry that List, Hash, Set, and Stream add panels send on success, so array adds are invisible to the same analytics pipeline wired for open/cancel on this feature.
Reviewed by Cursor Bugbot for commit 8e5b8c9. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e5b8c986c
ℹ️ 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".
…ndex) Add an inline "Add element" form in the View tab: a value input and an optional index. Empty index appends to the end (POST /array/append, the atomic ARSET-at-length); an explicit index sets there (POST /array/set-element). The add is wrapped in the production-write confirmation, the index is validated as a canonical decimal, and the View (range + length/count) is refreshed on success so the new element appears. ARINSERT is intentionally not used — see docs/array-modify-vertical-plan.md. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
8e5b8c9 to
4ea0c84
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ea0c84c0c
ℹ️ 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".
applyArrayWriteResult now gates the write's success side effects (onSuccess/closePanel) on the live browser-context selected key matching keyProp. The ArrayAddForm spec rendered with the default store, where app.context.browser.keyList.selectedKey is null, so closePanel was never invoked and the append test's assertion no longer held. Render the form with a store whose selected key is the form's keyProp so the success path runs, exercising the panel-close behaviour as it does in the app. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd02e63609
ℹ️ 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".
The selected-key guard in applyArrayWriteResult is not enough: a user can submit a write for key A, switch away, then return to A and open a fresh add panel before the first request resolves. The live key is A again, so the guard passes and runs the original form's handleSuccess, whose closePanel closes the *current* (different) panel. Guard handleSuccess with an isMounted ref so a form instance's success callback no-ops once that form has unmounted; the refresh still runs (A is selected, the write landed there). Adds a regression test that unmounts mid-flight and asserts closePanel is not called. References: #RI-8222 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>


What
Adds the Add element UI to the array key View tab, completing the Modify
vertical on the frontend. A right-aligned "Add Elements" action opens a slide-out
panel (reusing the shared
AddItemsAction+AddKeysContainerchrome, so itmatches Lists / Vector Sets).
The panel takes a value and an optional index:
POST /array/append)POST /array/set-element)An info icon next to the index field explains that leaving it empty appends to
the end. The index is validated against the canonical decimal form (matching the
backend
@IsArrayIndex), and writes go through the production-write confirmation.Notes
appendArrayElement/addArrayElement, both refreshing thekey on success.
Note
Medium Risk
Writes mutate production Redis array keys via new API paths; mitigations include production confirmation, index validation, and stale-key guards on success side effects.
Overview
Adds Add Elements to the array key View tab: a slide-out panel (shared with List/Vector Set chrome) where users enter a value and an optional index.
Empty index triggers
POST /array/append; a provided index usesPOST /array/set-element(overwrite at that slot, not insert). Index input is validated to canonical decimal strings (backend@IsArrayIndex); writes use production-write confirmation via newbrowser:add-array-elements.New Redux thunks
appendArrayElementandaddArrayElementrefresh the view and key header on success, but only when the target key is still selected (applyArrayWriteResult+ byte-exact buffer compare). The form and View tab also guard against stale async callbacks and auto-close the panel on key change.ArrayDetails/ViewTabwire optional telemetry hooks (onOpenAddItemPanel/onCloseAddItemPanel) like other key types.Reviewed by Cursor Bugbot for commit 01b511b. Bugbot is set up for automated code reviews on this repo. Configure here.