Skip to content

ci(settings): mirror experimental flags and backend-switch fixes - #134

Draft
enyst wants to merge 30 commits into
mainfrom
claude/project-thread-hb0du7
Draft

enyst wants to merge 30 commits into
mainfrom
claude/project-thread-hb0du7

Conversation

@enyst

@enyst enyst commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

HUMAN:

wait, i didnt mean to answer that react/unreact question. i meant to answer differently to should every OH agent get react and unreact tools: i think it would be nice to make a feature flag system, and add there our first feature under yes/no from the user: Conversation reactions.

then maybe we get to merge that before the full Projects.

and it would be on all conversations


AGENT:

Why

Draft CI mirror of OpenHands#19503. This is not a request to merge into the fork's main branch. The upstream PR is a same-repository branch; only a passing, verified head will be copied back there.

Summary

  • Keep experimental-feature list/update operations separate from conversation-reaction writes, and consume the SDK ReactionEvent type.
  • Rebuild backend-specific command-menu items on Local/Cloud changes, using an explicit backendKind input instead of a hidden global read.
  • Remove the redundant Cloud condition from the reaction picker. The backend-scoped experimental-feature service remains the single support boundary; Cloud lists no enabled flags and makes no local settings request.

Issue Number

Related fork mirror: #135 (canonical issue: OpenHands#19505).
SDK dependency: OpenHands/software-agent-sdk#6609.

How to Test

  • Ran six focused Vitest files: command-menu, command-menu-items, message-reactions, experimental-settings, use-update-experimental-feature, and no-direct-agent-server-calls. All 55 tests pass. The new command-menu transition regression fails before the fix.
  • Typecheck, changed-file ESLint, app build and library build pass with the locally packed SDK client from source commit 91e8b5b6801b077f149c94ef38c2da85228cdf35.
  • Real isolated Canvas with DeepSeek Flash: Local enabled shows picker and Experimental command; switch to authenticated Cloud hides both, with zero experimental-settings/reaction requests on a completed Cloud answer; switch back restores both and saves a heart with HTTP 200.
  • Earlier full-suite run had 16 failures, all reproduced against the unchanged upstream PR head. Fifteen were Mac Docker-shell failures; one was the experimental route's intentionally separate verification-map entry.

Video/Screenshots

Experimental settings enabled on the real stack

Durable agent and user reactions

Inspected screenshots, recording, API observations, logs, and explicit coverage limits are in the access-controlled evidence report:
https://ampcode.com/artifacts/experimental-flags-readiness-53f71bc3-e6ff-4f4e-83f9-d93e9e98b062

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

The committed client pin is still 1.62.0 and does not yet include the required experimental-feature/reaction API. Clean CI is expected to expose this known release dependency until the SDK/client release is published and Canvas is pinned to it. No workflow is modified to hide that gap.

The primary change is the feature described by the mirrored enhancement issue; this draft also includes its backend-switch regression fix. The HUMAN note was added by enyst and is preserved unchanged. The upstream PR description remains untouched.

claude and others added 27 commits November 7, 2026 20:18
…n reaction chips

Settings > Features lists the agent server's user feature flags
(GET /api/settings/features) as switches; the first is Conversation
reactions. Chat messages and finish actions show emoji reactions from
ReactionEvents (the agent's react tool and the person's own), and while
the feature is on the person can add or take off a reaction on the agent's
messages. The react/unreact tool calls are hidden from the chat.

Needs the @openhands/typescript-client release that carries
listFeatures/updateFeature/react (software-agent-sdk#6609).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
… timestamp

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
… picker beside its button

The reaction picker opens to the right of its button instead of over the
message, and Escape closes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
…actions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
The verify-skill isolation check keeps feature-map changes out of code PRs.
The F31 entry lands on the verification branch after this PR merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
- Index reactions once per events array instead of scanning every event
  per message; each message subscribes once and passes its state down.
- No picker on a planning agent's messages: they live in a
  sub-conversation the reactions route does not address.
- Picker: closes on outside click and Escape, focuses its first emoji,
  and returns focus to its button; a plain group instead of role=menu.
  Read-only chips stay focusable (aria-disabled).
- Errors show the server's reason (displayApiErrorToast) with a
  translated fallback.
- The features list treats only a 404 (older agent server) as empty and
  shows an error otherwise; a toggle updates only the active backend's
  cached list; Features is hidden on Cloud backends.
- A failed react observation stays visible in the chat.
- Tests go through the rendered row and cover the planning agent,
  Escape and focus, error toasts, the 404 and error states.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
Engel asked for the page to read "Experimental", not "Features", and
for the API to live under /experimental. The page moves to
/settings/experimental with the nav and command-menu label
"Experimental", and calls the agent server's
GET/PATCH /api/settings/experimental through the client's
listExperimentalFeatures/updateExperimentalFeature. Code names follow
(experimentalFeaturesService, useExperimentalFeatures, ...), which also
keeps clear of the operator feature policy (OpenHands#18843).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
The client type is ExperimentalFeature, the reactions flag constant is
CONVERSATION_REACTIONS_EXPERIMENTAL_FEATURE, comments and test names say
experimental features, and the evidence folder is
.pr/experimental-features-reactions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
…s backend

A react or unreact call stays in the chat until its observation replaces it,
so under "Always confirm" the person sees the emoji and message they are
asked to approve. Its successful result still shows only as the chip.

The experimental-feature switch now writes the server's answer to the cache
of the backend it was sent to, not to whichever backend is active when the
answer arrives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
Experimental features: every request names its backend, fixed when the
person flips the switch, so a queued or slow switch still reaches and caches
for that backend. Reads of the list in flight are cancelled around a switch
and the list is fetched again after it, so an older read cannot undo it. The
cache key and these rules live with the query and mutation hooks.

Reactions: a successful react/unreact result no longer drops the agent's
narration on the call. groupEvents keeps its thought and reasoning and drops
only the tool card; model messages do not anchor to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
…-hb0du7

# Conflicts:
#	src/i18n/translation.json
Resolve the tailwind.css conflict by keeping both the emoji font token and
main's new HeroUI theme tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
The Agent Server's list only reports whether each feature is on.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJKhrR2viNUM9gjr89
The chip appears on click and the server's ReactionEvent takes over when
it arrives. The agent server now holds a reaction back while a tool call
waits for its result, so the event can come later than the click. A
failed request takes the chip back off.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJKhrR2viNUM9gjr89
Comments and test names only; matches the agent server's wording.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJKhrR2viNUM9gjr89
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
The picker always opened to the right of its button, so on a phone with
five reactions on a message its last choices fell outside the chat area.
When it would overflow, it now opens above the button, moved left to stay
8px inside the nearest clipping container (or the window).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
A line under the features list says experimental features can change
significantly and are not guaranteed to stay backwards compatible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
Keep the experimental feature service focused on generic flag management and
move conversation reaction writes into their own service. Use the SDK
ReactionEvent type in the event union instead of a local optional-field sketch.

Cover independently toggling a second server-defined flag and ensure Cloud
does not contact the local experimental settings endpoint.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1db06-6078-7046-b531-1342c30a4a94
Co-authored-by: Amp <amp@ampcode.com>
…tches

Pass the backend kind explicitly to command-menu construction and rebuild its
items when that kind changes. This prevents stale Experimental and Condenser
entries after switching between Local and Cloud.

Let reaction eligibility depend on the experimental flag rather than a second
Cloud check. Cover backend transitions through the real provider and feature
service, and retain the Local picker as a control.

Verified Local to authenticated Cloud to Local with real DeepSeek answers,
including a successful Local heart write after returning. Focused tests,
typechecking, changed-file lint, and app/library builds pass.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1db06-6078-7046-b531-1342c30a4a94
Co-authored-by: Amp <amp@ampcode.com>
@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

Copy link
Copy Markdown

PR Artifacts Notice

This PR adds or changes temporary PR-specific documents under .pr/. They stay on this branch for review. After this PR merges, the next release PR removes them from main.

@enyst enyst changed the title CI mirror: experimental flags and backend-switch isolation (#19503) ci(settings): mirror experimental flags and backend-switch fixes Nov 14, 2026
@github-actions github-actions Bot added the type: ci CI configuration changes label Nov 14, 2026
claude and others added 3 commits November 15, 2026 11:38
Copilot review on OpenHands#19503:
- Any reaction event for the message cleared every pending click, so a
  pending emoji could flicker off, or an older event bring back one just
  taken off. Each emoji's pending click now stays until the server's
  events agree with it.
- Choosing an emoji returned focus to the add button and disabled it in the
  same update, which dropped keyboard focus. The button now stays enabled
  (aria-disabled) and ignores clicks while a reaction saves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ArwwJ5sQMXhwgSTG2Ztkt
Keep optimistic reactions until their own returned event IDs reach the event
store, rather than dropping all pending choices on any reaction update.
Roll back only the failed emoji so intervening acknowledgements stay intact.
Keep the picker trigger focusable while guarding activation during requests.

Cover delayed and interleaved acknowledgements, failure rollback, both HTTP
and event arrival orders, and keyboard activation while saving.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1db06-6078-7046-b531-1342c30a4a94
Co-authored-by: Amp <amp@ampcode.com>
Preserve upstream 9a70c18 and the fork's reviewed acknowledgement fix.
Retain the focus fix and both test sets, adapting response fixtures to the
SDK ReactionEvent returned by the service.

Reproduce the remaining value-matching race on 9a70c18: an unrelated event
can clear a queued removal before its earlier add arrives. Reconcile using
the exact returned event ID, and retain accepted optimistic state after a
failed removal. Combined validation: 89 tests, typecheck, ESLint, app/library
builds, and real Chromium focus checks pass with the source-backed client.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1db06-6078-7046-b531-1342c30a4a94
Co-authored-by: Amp <amp@ampcode.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: ci CI configuration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants