Skip to content

fix(prompt): keep footer mounted across slash suggestions - #1943

Merged
kevincodex1 merged 1 commit into
Twigpine:mainfrom
Hanxcellent:fix/input-freeze-slash
Jul 11, 2026
Merged

kevincodex1 merged 1 commit into
Twigpine:mainfrom
Hanxcellent:fix/input-freeze-slash

Conversation

@Hanxcellent

@Hanxcellent Hanxcellent commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep the regular prompt footer mounted while inline slash suggestions temporarily replace it
  • collapse hidden footer content without adding a terminal row
  • preserve the configured statusline component across the suggestion visibility transition so its external command is not restarted

Fixes #1942.

Impact

  • user-facing impact: typing remains responsive when a slash-command dropdown disappears after a non-match or completed command; slash matching, selection, and execution behavior are unchanged
  • developer/maintainer impact: adds a small KeepMounted layout helper and direct regression coverage for mount identity and footer statusline resolution

Testing

  • bun run build
  • bun run smoke
  • bun run check — branch and origin/main@4f971a13 each reported 92 normalized failure names; fix-only=0, main-only=0
  • focused tests: bun test src/components/PromptInput/KeepMounted.test.tsx src/components/PromptInput/PromptInputFooter.test.tsx — 15 pass, 0 fail
  • bun run typecheck
  • bun run typecheck:type-tests — 10 focused type-test files passed
  • bun run security:pr-scan

Notes

  • provider/model path tested: not applicable; this changes prompt footer lifecycle only
  • screenshots attached (if UI changed): not applicable; terminal presentation is intentionally unchanged and the corrected symptom is a timing/input-stall behavior that a static screenshot cannot show
  • follow-up work or known limitations: Ctrl+C feedback and @ file-suggestion responsiveness are intentionally excluded and will be reviewed separately

Summary by CodeRabbit

  • New Features

    • Improved prompt footer transitions between status messages, inline suggestions, and help content.
    • Footer content now stays mounted while visually hidden when alternate bottom-slot content is shown, reducing flicker.
    • Custom status line choices are consistently respected during transient UI states.
  • Tests

    • Added coverage verifying footer-related components remain mounted across visibility toggles.
    • Added validation for custom status line resolution when transient UI guards are active.

Copilot AI review requested due to automatic review settings July 11, 2026 07:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 97435588-5f7d-45ad-abb9-8bee343cb1e0

📥 Commits

Reviewing files that changed from the base of the PR and between 1016d46 and 38d587f.

📒 Files selected for processing (4)
  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: CodeRabbit
  • GitHub Check: smoke-and-tests (22)
  • GitHub Check: smoke-and-tests (24.11.x)
  • GitHub Check: typecheck
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

TypeScript code in this repository must use strict mode and ESM imports.

Files:

  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
src/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Use React + Ink for terminal UI components under src/components/.

Files:

  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
**

⚙️ CodeRabbit configuration file

**: # AGENTS.md - AI Agent Coding Guide

This guide is for AI coding agents working in the OpenClaude repository. Read it before changing code, and also follow CONTRIBUTING.md for contributor policy, PR expectations, review follow-up, and project scope.

Project Snapshot

OpenClaude is a coding-agent CLI for cloud and local model providers. It supports OpenAI-compatible APIs, Anthropic, Gemini, DeepSeek, Ollama, MCP, local backends, slash commands, tools, agents, and a React/Ink terminal UI.

The installed CLI runs on Node.js >=22.0.0. Bun is used for source builds, scripts, dependency management, and tests.

Work Style

  • Keep changes focused on one problem.
  • Prefer existing patterns in the file or nearby module.
  • Avoid unrelated formatting, renames, dependency changes, or broad rewrites.
  • Add or update tests when behavior changes.
  • Update docs when setup, commands, provider behavior, or user-facing behavior changes.
  • For new features, larger refactors, dependencies, or runtime changes, follow the issue-first guidance in CONTRIBUTING.md.

Stack And Conventions

  • TypeScript with strict mode and ESM imports.
  • React + Ink for terminal UI.
  • Bun lockfile and Bun scripts for development workflows.
  • Node runtime for the built CLI.

Common libraries and patterns:

  • chalk for terminal color.
  • commander for CLI argument parsing.
  • execa for child processes.
  • Existing service, provider, settings, permission, and UI patterns over new abstractions.

Repository Map

  • src/commands/ - slash and CLI command implementations.
  • src/components/ - React/Ink UI components.
  • src/services/ - API, MCP, OAuth, wiki, voice, and other service integrations.
  • src/tools/ - tool implementations.
  • src/utils/ - shared utilities.
  • src/integrations/ - provider and model integration metadata.
  • src/entrypoints/ - CLI, MCP, SDK, and generated public types.
  • src/tasks/ - local, remote, workflow, and monitor tas...

Files:

  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
**/*

⚙️ CodeRabbit configuration file

**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.

Files:

  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}

⚙️ CodeRabbit configuration file

{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.

Files:

  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/PromptInputFooter.test.tsx
🔇 Additional comments (4)
src/components/PromptInput/KeepMounted.tsx (1)

1-16: LGTM!

src/components/PromptInput/KeepMounted.test.tsx (1)

1-61: LGTM!

The zero-row hidden layout assertion (lines 48-52) addresses the prior review feedback.

src/components/PromptInput/PromptInputFooter.tsx (1)

24-24: LGTM!

Clean separation of configuredFooterStatusLine (persistent config) from footerStatusLine (transient visibility). The nested KeepMounted usage correctly preserves the status line component mount across visibility toggles, and showInlineSuggestions correctly excludes fullscreen mode where the overlay path handles suggestions.

Also applies to: 48-56, 178-178, 195-214

src/components/PromptInput/PromptInputFooter.test.tsx (1)

4-4: LGTM!

Also applies to: 64-75


📝 Walkthrough

Walkthrough

Changes

Prompt footer lifecycle

Layer / File(s) Summary
KeepMounted visibility wrapper
src/components/PromptInput/KeepMounted.tsx, src/components/PromptInput/KeepMounted.test.tsx
Adds a wrapper that hides content with zero height while preserving child mounting, with lifecycle tests for visibility toggles and root unmounting.
Footer status and rendering integration
src/components/PromptInput/PromptInputFooter.tsx, src/components/PromptInput/PromptInputFooter.test.tsx
Separates configured status-line selection from transient footer visibility, keeps the regular footer mounted, and tests custom status-line behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: jatmn, kevincodex1

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Risk Surface Disclosed ❓ Inconclusive The footer/statusline path invokes an external command, but no review text is available here to verify a risk-surface callout or blocker decision. Provide the review/comment thread or add an explicit review note stating the background-execution risk and whether it is blocking.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately describes the main change to keep the prompt footer mounted during slash suggestions.
Description check ✅ Passed The description follows the template closely and includes summary, impact, testing, and notes sections with relevant details.
Linked Issues check ✅ Passed The changes satisfy #1942 by preserving footer mount identity, collapsing hidden content, and adding regression tests.
Out of Scope Changes check ✅ Passed The diff stays focused on PromptInput footer lifecycle and its tests, with no clear unrelated or extraneous changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
No Hidden Policy Change ✅ Passed Only footer mount/lifecycle logic changed; no product, trust, routing, telemetry/network, or permission-policy defaults were altered.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/PromptInput/KeepMounted.test.tsx`:
- Around line 13-47: Extend the “keeps children mounted while visibility
changes” test to inspect the test stdout immediately after render(true) and
assert that the hidden KeepMounted output occupies zero visible rows. Preserve
the existing mount and unmount identity assertions and use the stdout buffer
exposed by createTestStdout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8f6511d8-97aa-4b14-aac8-439f76c1d6cb

📥 Commits

Reviewing files that changed from the base of the PR and between 4f971a1 and 1016d46.

📒 Files selected for processing (4)
  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: CodeRabbit
  • GitHub Check: smoke-and-tests (24.11.x)
  • GitHub Check: smoke-and-tests (22)
  • GitHub Check: typecheck
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

TypeScript code in this repository must use strict mode and ESM imports.

Files:

  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
src/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Use React + Ink for terminal UI components under src/components/.

Files:

  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
**

⚙️ CodeRabbit configuration file

**: # AGENTS.md - AI Agent Coding Guide

This guide is for AI coding agents working in the OpenClaude repository. Read it before changing code, and also follow CONTRIBUTING.md for contributor policy, PR expectations, review follow-up, and project scope.

Project Snapshot

OpenClaude is a coding-agent CLI for cloud and local model providers. It supports OpenAI-compatible APIs, Anthropic, Gemini, DeepSeek, Ollama, MCP, local backends, slash commands, tools, agents, and a React/Ink terminal UI.

The installed CLI runs on Node.js >=22.0.0. Bun is used for source builds, scripts, dependency management, and tests.

Work Style

  • Keep changes focused on one problem.
  • Prefer existing patterns in the file or nearby module.
  • Avoid unrelated formatting, renames, dependency changes, or broad rewrites.
  • Add or update tests when behavior changes.
  • Update docs when setup, commands, provider behavior, or user-facing behavior changes.
  • For new features, larger refactors, dependencies, or runtime changes, follow the issue-first guidance in CONTRIBUTING.md.

Stack And Conventions

  • TypeScript with strict mode and ESM imports.
  • React + Ink for terminal UI.
  • Bun lockfile and Bun scripts for development workflows.
  • Node runtime for the built CLI.

Common libraries and patterns:

  • chalk for terminal color.
  • commander for CLI argument parsing.
  • execa for child processes.
  • Existing service, provider, settings, permission, and UI patterns over new abstractions.

Repository Map

  • src/commands/ - slash and CLI command implementations.
  • src/components/ - React/Ink UI components.
  • src/services/ - API, MCP, OAuth, wiki, voice, and other service integrations.
  • src/tools/ - tool implementations.
  • src/utils/ - shared utilities.
  • src/integrations/ - provider and model integration metadata.
  • src/entrypoints/ - CLI, MCP, SDK, and generated public types.
  • src/tasks/ - local, remote, workflow, and monitor tas...

Files:

  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
**/*

⚙️ CodeRabbit configuration file

**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.

Files:

  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/KeepMounted.test.tsx
  • src/components/PromptInput/KeepMounted.tsx
  • src/components/PromptInput/PromptInputFooter.tsx
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}

⚙️ CodeRabbit configuration file

{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.

Files:

  • src/components/PromptInput/PromptInputFooter.test.tsx
  • src/components/PromptInput/KeepMounted.test.tsx
🔇 Additional comments (4)
src/components/PromptInput/KeepMounted.tsx (1)

1-16: LGTM!

src/components/PromptInput/PromptInputFooter.tsx (2)

48-55: LGTM!


178-214: LGTM!

src/components/PromptInput/PromptInputFooter.test.tsx (1)

64-74: LGTM!

Comment thread src/components/PromptInput/KeepMounted.test.tsx
Copilot AI review requested due to automatic review settings July 11, 2026 07:50
@Hanxcellent
Hanxcellent force-pushed the fix/input-freeze-slash branch from 1016d46 to 38d587f Compare July 11, 2026 07:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kevincodex1 kevincodex1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@kevincodex1
kevincodex1 merged commit 4faf666 into Twigpine:main Jul 11, 2026
5 checks passed
hotmanxp pushed a commit to hotmanxp/openclaude that referenced this pull request Jul 12, 2026
hotmanxp added a commit to hotmanxp/openclaude that referenced this pull request Jul 12, 2026
Cherry-pick of upstream 4faf666. Worktree fsync with conflict
resolution: dropped dead 'builtin' branch from JSX because
BuiltinStatusLine.tsx is not in OpenCC (the static built-in path
was upstream-only).

Co-authored-by: Xiang Han <101250779+Hanxcellent@users.noreply.github.com>
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.

Prompt input stalls when slash suggestions disappear

3 participants