fix(actions): read objectstack#3962's single-wrapped /actions responses - #2971
Merged
Conversation
objectstack#3962 made /actions failures speak HTTP and single-wrapped success — body.data IS the handler's return value. interpretActionResponse / readActionPayload treat that as the primary shape; the pre-#3962 double envelope is detected narrowly (boolean success, no foreign keys) and unwrapped for older runtimes, so a handler value that merely contains a success key passes through untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AvZj6cLX7APd7roh2eK4F
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
… a late reset
The cursor reset on new results lived in a useEffect. Effects flush
asynchronously after the render that delivered the records — so a reset queued
by their arrival could land AFTER a subsequent ArrowDown and wipe the just-set
cursor. That was the residual ArrowDown→Enter flake in PeoplePicker.test.tsx
(the earlier signature-keyed fix closed the too-often resets, not the too-late
one), and a real fast-fingers UX bug: rows appear, the user presses ArrowDown,
the highlight vanishes.
The reset now runs in the render phase ("adjusting state during render"), in
the same render that shows the new rows — by the time a row is visible the
reset has already happened, so it can never race a keypress. Semantics are
pinned by a new test: a replaced result set does not inherit the previous
set's cursor.
LookupField keeps its own length-keyed effect reset: it deliberately resets on
every option-count change while typing, a different semantic.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011AvZj6cLX7APd7roh2eK4F
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to objectstack-ai/objectstack#3969 (issue objectstack-ai/objectstack#3962):
/actionsfailures now speak HTTP and success is a single wrap —body.dataIS the handler's return value.Changes
interpretActionResponse/readActionPayloadtreat the single wrap as the primary shape. The pre-#3962 double envelope is detected narrowly (isLegacyActionEnvelope: a booleansuccesswith no keys beyond the envelope's own) and unwrapped for older runtimes — so a handler value that merely contains asuccesskey is handler-owned and passes through untouched (test pins this).error.details.{code, fields}) resolves to a string toast via the existingactionErrorDetailpath — no React Task: Refactor Monorepo to Support Lazy-Loaded Plugins #31 regression.ActionResult.data's depth quirk self-heals on #3962 servers: envelope and payload are the same object.actions-envelope.ratchet.test.tsguard is unchanged — both call sites still go through the one helper.Also in this PR: the PeoplePicker keyboard flake, fixed at the root
Shard 2 flaked on
PeoplePicker.test.tsx › keyboard: ArrowDown then Enter commits the active row. Investigated rather than re-run-and-hope: the flake is a real component bug. The cursor reset on new results lived in auseEffect; effects flush asynchronously after the render that delivered the records, so a reset queued by their arrival could land after a subsequent ArrowDown and wipe the just-set cursor. (The earlier signature-keyed fix in this file closed the too-often resets; this was the too-late one.) Real-world shape: rows appear, a fast user presses ArrowDown, the highlight vanishes.The reset now runs in the render phase (React's "adjusting state during render" pattern) — same render that shows the new rows, so it can never race a keypress. Semantics pinned by a new test (a replaced result set does not inherit the previous set's cursor); the flaking test passes 6/6 consecutive local runs.
LookupFieldkeeps its own length-keyed effect reset deliberately — different semantics (reset on every count change while typing).Testing
app-shellsuite: 1937 passed (235 files);fields: 453 passed (35 files, +1 new); type-check clean both packages.🤖 Generated with Claude Code
https://claude.ai/code/session_011AvZj6cLX7APd7roh2eK4F