Skip to content

test: wait for active session in slash command e2e - #2651

Merged
Astro-Han merged 1 commit into
mainfrom
test/ci-stabilize-slash-command-readiness
Aug 10, 2026
Merged

Astro-Han merged 1 commit into
mainfrom
test/ci-stabilize-slash-command-readiness

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • wait for the optimistic user message before exercising slash commands during the first running turn
  • use active-session transcript ownership as the readiness signal instead of treating the Stop button as a proxy
  • prevent /side discovery from racing the first send's asynchronous setActiveId

Verification

  • npx biome check apps/desktop/e2e/slash-command-menu.spec.ts
  • npm --workspace @maka/desktop run build:with-deps
  • focused regression repeated 5 times: 5 passed
  • slash-command-menu.spec.ts: 4 passed

Root cause

The test continued as soon as the locally armed turn exposed the Stop button. The first-send path sets the active session only after sessions.send resolves, while /side is cataloged only when an active session exists. The test could therefore open the slash menu before the session-owning transcript was ready and wait forever on an option that was omitted from that menu instance.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@Astro-Han
Astro-Han marked this pull request as ready for review August 10, 2026 15:12
@Astro-Han

Copy link
Copy Markdown
Contributor Author

All checks are green. This just fixes a race in the E2E setup and doesn’t change product behavior, so I’m merging it as a low-risk test-only change.

@Astro-Han
Astro-Han merged commit 4e5bd31 into main Aug 10, 2026
11 checks passed
@Astro-Han
Astro-Han deleted the test/ci-stabilize-slash-command-readiness branch August 10, 2026 15:44
M4n5ter added a commit that referenced this pull request Nov 23, 2026
Synchronize vendored third-party/nsh with upstream longbridge/nsh main
through d01cd3cce6645391c65a379d6230c2d2e651d55f (371 commits past 0.6.1),
migrate Maka consumers to upstream's Window Model v2 and native TitleBar,
and fix invisible IME preedit in the Windows RichEditor composer.

Key changes:
- Upstream NSH sync (2f51d861..d01cd3cce): Window Model v2 (#2307), native
  TitleBar (#2937), RichEditor TextGeometry (#2650/#2651) and narrow sink
  fixes (#2497/#2728), Windows custom font resolution (#2760), macOS
  server-side drag regions (#2663), and clipboard write reporting (#2753).
- Upstream best practices in Maka UI & shells:
  - Declare explicit <Window id="main"> in Bootstrap.tsx and
    ComputerPermissionSetupEntry.tsx with hidden titleBar and closeOnPress
    set upfront, and subscribe to Application.on('reopen') in nativeDesktop.ts.
  - Adopt upstream <TitleBar> from nsh/base in ComputerPermissionSetup.tsx
    and ui.tsx (SidebarTitleRow) instead of manual control-inset/drag logic.
  - Support EmbeddedHost in nsh-engine / nsh-js / desktop AppViews so
    embedded hosts (Linux GTK shell, macOS permission setup, Windows test
    hosts) bind <Window id="main"> to ROOT_ID while preserving secondary
    <Window> scenes.
  - Adapt Windows desktop-shell (direct2d.rs) and workbench tests to
    Window Model v2 and Headless viewport/title_bar initialization.
- Windows Composer IME preedit fix (nsh-platform-windows):
  - Enable IMF_IMEALWAYSSENDNOTIFY via EM_SETLANGOPTIONS on windowless
    RichEdit editors so msftedit.dll emits EN_CHANGE/EN_SELCHANGE during
    undetermined IME composition instead of suppressing them until commit.
  - Target the active AppWindow HWND (shown_in / hwnd_showing) in
    tx_imm_get_context, tx_imm_release_context, tx_get_window, update_ime,
    and notify_composition rather than the hidden host HWND.
  - Add regression tests for IMF_IMEALWAYSSENDNOTIFY, tx_get_window
    shown_in tracking, and EmbeddedHost root/secondary windows.
- Provenance and notices: update third-party/nsh/{upstream.json,SOURCE.md},
  LICENSE, and regenerate products/maka/cli/{DEPENDENCIES.rust.tsv,
  THIRD_PARTY_NOTICES.txt,notices.json}.

Generated-by: Maka (Gemini)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant