Skip to content

fix(web): restore main check/test stability after merge regressions#601

Open
nikolasdehor wants to merge 1 commit intoamantus-ai:mainfrom
nikolasdehor:fix/web-main-check-and-test-stability
Open

fix(web): restore main check/test stability after merge regressions#601
nikolasdehor wants to merge 1 commit intoamantus-ai:mainfrom
nikolasdehor:fix/web-main-check-and-test-stability

Conversation

@nikolasdehor
Copy link
Copy Markdown

@nikolasdehor nikolasdehor commented Feb 23, 2026

Summary

  • fix unresolved merge artifact and duplicate function in cast-converter.ts
  • restore missing session-view contracts (UIStateManager fields/methods + direct keyboard callback)
  • remove stale/invalid references in input-manager and clean dead waiting-state writes in terminal-chat-view
  • update auth login copy to match expected UX text
  • hide floating mobile keyboard button while quick keys are visible
  • make test launcher generation deterministic by creating web/native/vibetunnel in ensure-native-modules.js
  • make vt test binary path resolution resilient in src/test/helpers/vt-paths.ts

Validation (local)

  • cd web && pnpm run check
  • cd web && pnpm run test
    • Result: 96 passed, 11 skipped test files
    • 1389 passed, 113 skipped tests

Context

This addresses real regressions observed on current main where check/test failed locally before these fixes.

Copilot AI review requested due to automatic review settings February 23, 2026 01:56
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a set of web/test regressions impacting check/test stability by restoring missing session-view state contracts, cleaning up merge artifacts, and making test execution paths more resilient/deterministic.

Changes:

  • Make test binary resolution more robust and ensure a deterministic native/vibetunnel launcher for tests.
  • Restore/extend session-view UI state contracts for mobile keyboard/direct-keyboard flows and adjust quick-keys/keyboard-button behavior.
  • Remove stale/duplicate logic introduced by merge regressions and update auth login copy.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
web/src/test/helpers/vt-paths.ts Prefer native/vibetunnel when present, fall back to bin/vibetunnel for tests.
web/src/client/utils/cast-converter.ts Removes duplicated/merged stream-connector implementation and keeps the canonical connectToStream.
web/src/client/components/terminal-chat-view.ts Removes dead “waiting” state writes and adjusts option-selection logging.
web/src/client/components/session-view/ui-state-manager.ts Restores/extends UI state (direct keyboard + mobile input) and adds toggles.
web/src/client/components/session-view/overlays-container.ts Hides floating keyboard button while quick keys are visible.
web/src/client/components/session-view/input-manager.ts Removes stale websocket-input cleanup code paths.
web/src/client/components/session-view/direct-keyboard-manager.ts Adds callback contract for showMobileInput to coordinate input suppression.
web/src/client/components/session-view.ts Wires new UI state/callbacks and adds handlers for special keys + mobile input toggle; formatting cleanup.
web/src/client/components/auth-login.ts Updates login UX copy to expected text.
web/scripts/ensure-native-modules.js Creates native/vibetunnel launcher for tests/dev to stabilize integration test execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +115 to +117
fs.writeFileSync(nativeLauncherPath, launcherScript, 'utf8');
fs.chmodSync(nativeLauncherPath, 0o755);
console.log(`Created native launcher for tests: ${nativeLauncherPath}`);
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unconditionally overwrites native/vibetunnel with a shell launcher. That path is also used by the SEA build (see build-native.js), so running tests after building the native executable would clobber it and potentially break local workflows. Consider only creating/updating the launcher when native/vibetunnel is missing or when the existing file is already the expected launcher (e.g., starts with #! and matches the generated content).

Suggested change
fs.writeFileSync(nativeLauncherPath, launcherScript, 'utf8');
fs.chmodSync(nativeLauncherPath, 0o755);
console.log(`Created native launcher for tests: ${nativeLauncherPath}`);
let shouldWriteLauncher = true;
if (fs.existsSync(nativeLauncherPath)) {
try {
const existingContent = fs.readFileSync(nativeLauncherPath, 'utf8');
if (!existingContent.startsWith('#!')) {
// Existing file is not a shell launcher (likely a native binary); do not clobber it.
console.log(
`native/vibetunnel already exists and is not a shell launcher; preserving existing file: ${nativeLauncherPath}`
);
shouldWriteLauncher = false;
} else if (existingContent === launcherScript) {
// Launcher is already up to date; nothing to do.
shouldWriteLauncher = false;
}
} catch (e) {
console.warn(
`Failed to read existing native/vibetunnel; attempting to recreate launcher: ${e.message}`
);
}
}
if (shouldWriteLauncher) {
fs.writeFileSync(nativeLauncherPath, launcherScript, 'utf8');
fs.chmodSync(nativeLauncherPath, 0o755);
console.log(`Created native launcher for tests: ${nativeLauncherPath}`);
}

Copilot uses AI. Check for mistakes.
!this.uiState.showQuickKeys
? html`
<div
class="keyboard-button mobile-keyboard-button ${this.uiState.showQuickKeys ? 'quick-keys-visible' : ''}"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new render condition including !this.uiState.showQuickKeys, the ${this.uiState.showQuickKeys ? 'quick-keys-visible' : ''} class segment is now always empty (dead code). Consider removing this conditional class to avoid misleading future readers, or revisiting the render condition if the class is still intended to apply sometimes.

Suggested change
class="keyboard-button mobile-keyboard-button ${this.uiState.showQuickKeys ? 'quick-keys-visible' : ''}"
class="keyboard-button mobile-keyboard-button"

Copilot uses AI. Check for mistakes.
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.

2 participants