Repository navigation
fix(prompt): keep footer mounted across slash suggestions - #1943
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📜 Recent review details⏰ Context from checks skipped due to timeout. (4)
🧰 Additional context used📓 Path-based instructions (5)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/components/**/*.tsx📄 CodeRabbit inference engine (AGENTS.md)
Files:
**⚙️ CodeRabbit configuration file
Files:
**/*⚙️ CodeRabbit configuration file
Files:
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (4)
📝 WalkthroughWalkthroughChangesPrompt footer lifecycle
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
src/components/PromptInput/KeepMounted.test.tsxsrc/components/PromptInput/KeepMounted.tsxsrc/components/PromptInput/PromptInputFooter.test.tsxsrc/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.tsxsrc/components/PromptInput/KeepMounted.test.tsxsrc/components/PromptInput/KeepMounted.tsxsrc/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.tsxsrc/components/PromptInput/KeepMounted.test.tsxsrc/components/PromptInput/KeepMounted.tsxsrc/components/PromptInput/PromptInputFooter.tsx
**
⚙️ CodeRabbit configuration file
**: # AGENTS.md - AI Agent Coding GuideThis 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:
chalkfor terminal color.commanderfor CLI argument parsing.execafor 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.tsxsrc/components/PromptInput/KeepMounted.test.tsxsrc/components/PromptInput/KeepMounted.tsxsrc/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.tsxsrc/components/PromptInput/KeepMounted.test.tsxsrc/components/PromptInput/KeepMounted.tsxsrc/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.tsxsrc/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!
1016d46 to
38d587f
Compare
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>
Summary
Fixes #1942.
Impact
KeepMountedlayout helper and direct regression coverage for mount identity and footer statusline resolutionTesting
bun run buildbun run smokebun run check— branch andorigin/main@4f971a13each reported 92 normalized failure names;fix-only=0,main-only=0bun test src/components/PromptInput/KeepMounted.test.tsx src/components/PromptInput/PromptInputFooter.test.tsx— 15 pass, 0 failbun run typecheckbun run typecheck:type-tests— 10 focused type-test files passedbun run security:pr-scanNotes
@file-suggestion responsiveness are intentionally excluded and will be reviewed separatelySummary by CodeRabbit
New Features
Tests