feat(core): replace InputBlock with explicit PromptProps#131
feat(core): replace InputBlock with explicit PromptProps#131zrosenbauer merged 6 commits intomainfrom
Conversation
…olation
Remove context-based input gating (InputBlock/useInputBlock) and useFocus
from all prompt components. Instead, every prompt extends PromptProps with
`focused` and `disabled` fields. The stories viewer passes `focused`
explicitly based on the active mode/panel.
- Add PromptProps interface (focused, disabled) shared by all prompts
- Remove InputBlock, useInputBlock, and input-gate.tsx
- Remove useFocus from 9 prompt components
- Remove @inkjs/ui dependency
- Rename isDisabled → disabled across prompts, stories, and internals
- Preview passes focused={false} to story component (visual-only)
- Interactive mode omits focused (defaults true, full control)
Co-Authored-By: Claude <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 4ff8cac The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Merging this PR will not alter performance
Comparing Footnotes
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughCentralizes prompt props into a new PromptProps type (focused, disabled) and replaces per-component isDisabled usage with focused/disabled across prompt components, stories, and prompt type exports. Renames useKeyBinding → useHotkey (UseKeyBindingArgs → UseHotkeyArgs) and removes useKeyInput, updating tests and the public UI export surface. Swaps some Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/core/src/ui/prompts/group-multi-select.tsx (1)
19-23:⚠️ Potential issue | 🟠 MajorPublic prop rename introduces a breaking API at compile time.
Line 19 and Line 61 remove support for
isDisabledon an exported component contract. Existing consumers passingisDisabledwill fail type-checking after upgrade. Add a deprecated alias during a transition window.Proposed compatibility patch
export interface GroupMultiSelectProps<TValue> extends PromptProps { + /** `@deprecated` Use `disabled` instead. */ + readonly isDisabled?: boolean /** Options organized by group name. */ readonly options: Readonly<Record<string, readonly PromptOption<TValue>[]>> @@ export function GroupMultiSelect<TValue>({ options, defaultValue = [], required = false, selectableGroups = false, onChange, onSubmit, - focused = true, - disabled = false, + focused = true, + disabled, + isDisabled, }: GroupMultiSelectProps<TValue>): ReactElement { + const resolvedDisabled = disabled ?? isDisabled ?? false @@ - { isActive: focused && !disabled } + { isActive: focused && !resolvedDisabled } ) @@ - disabled={disabled} + disabled={resolvedDisabled} />As per coding guidelines "Review with high signal only. Flag only: ... Breaking changes (incompatible API changes, removed exports)."
Also applies to: 54-63
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/core/src/ui/prompts/group-multi-select.tsx` around lines 19 - 23, The exported GroupMultiSelectProps<TValue> interface removed the public isDisabled prop causing a breaking TypeScript change; restore backward compatibility by adding a deprecated alias for isDisabled (e.g., keep the new prop name but add an optional readonly isDisabled?: boolean mapped to the new property) in GroupMultiSelectProps and ensure the GroupMultiSelect component props accept and forward isDisabled to the internal implementation (preserve behavior in the component that consumes options and selection), mark the alias as deprecated in comments so consumers can migrate while avoiding compile errors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/core/src/ui/index.ts`:
- Line 19: The public export renamed Ink's useInput to useInkInput and replaced
the previous key-binding API with useHotkey/UseHotkeyArgs, which breaks
downstream consumers; restore backward compatibility by re-exporting the
original symbols as aliases (export { useInkInput as useInput } and export {
useHotkey, UseHotkeyArgs } alongside any new names) or add compatibility
wrappers that forward to the new implementations so existing imports still work
while keeping the new names available; update the barrel exports around
useInkInput/useInput and useHotkey/UseHotkeyArgs to include both names.
In `@packages/core/src/ui/prompts/autocomplete.tsx`:
- Around line 22-23: The export AutocompleteProps<TValue> removed the previously
exported prop isDisabled which is a breaking change; restore backward
compatibility by reintroducing an optional isDisabled?: boolean on
AutocompleteProps and inside the Autocomplete component (or any function
handling props like the component that reads disabled) prefer the new name but
accept the old alias by resolving disabledValue = disabled ?? isDisabled and use
disabledValue everywhere; mark isDisabled as deprecated in the type comment so
it can be removed in a later release.
---
Outside diff comments:
In `@packages/core/src/ui/prompts/group-multi-select.tsx`:
- Around line 19-23: The exported GroupMultiSelectProps<TValue> interface
removed the public isDisabled prop causing a breaking TypeScript change; restore
backward compatibility by adding a deprecated alias for isDisabled (e.g., keep
the new prop name but add an optional readonly isDisabled?: boolean mapped to
the new property) in GroupMultiSelectProps and ensure the GroupMultiSelect
component props accept and forward isDisabled to the internal implementation
(preserve behavior in the component that consumes options and selection), mark
the alias as deprecated in comments so consumers can migrate while avoiding
compile errors.
🪄 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: 8a6a2c6d-8fd3-4f03-a5ba-f63545afd122
⛔ Files ignored due to path filters (2)
.changeset/input-isolation-prompt-props.mdis excluded by!.changeset/**pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!pnpm-lock.yaml
📒 Files selected for processing (37)
packages/core/package.jsonpackages/core/src/stories/viewer/components/field-control.tsxpackages/core/src/stories/viewer/components/help-overlay.tsxpackages/core/src/stories/viewer/components/preview.tsxpackages/core/src/stories/viewer/components/sidebar.tsxpackages/core/src/stories/viewer/hooks/use-double-escape.tspackages/core/src/stories/viewer/stories-app.tsxpackages/core/src/ui/index.tspackages/core/src/ui/layout/tabs.tsxpackages/core/src/ui/prompts/autocomplete.stories.tsxpackages/core/src/ui/prompts/autocomplete.tsxpackages/core/src/ui/prompts/confirm.stories.tsxpackages/core/src/ui/prompts/confirm.tsxpackages/core/src/ui/prompts/cursor-value.tsxpackages/core/src/ui/prompts/group-multi-select.stories.tsxpackages/core/src/ui/prompts/group-multi-select.tsxpackages/core/src/ui/prompts/index.tspackages/core/src/ui/prompts/multi-select.stories.tsxpackages/core/src/ui/prompts/multi-select.tsxpackages/core/src/ui/prompts/option-row.tsxpackages/core/src/ui/prompts/password-input.stories.tsxpackages/core/src/ui/prompts/password-input.tsxpackages/core/src/ui/prompts/path-input.stories.tsxpackages/core/src/ui/prompts/path-input.tsxpackages/core/src/ui/prompts/select-key.stories.tsxpackages/core/src/ui/prompts/select-key.tsxpackages/core/src/ui/prompts/select.stories.tsxpackages/core/src/ui/prompts/select.tsxpackages/core/src/ui/prompts/text-input.stories.tsxpackages/core/src/ui/prompts/text-input.tsxpackages/core/src/ui/prompts/types.tspackages/core/src/ui/use-input.test.tspackages/core/src/ui/use-input.tspackages/core/src/ui/use-key-binding.test.tspackages/core/src/ui/use-key-binding.tspackages/core/src/ui/use-key-input.test.tspackages/core/src/ui/use-key-input.ts
💤 Files with no reviewable changes (3)
- packages/core/package.json
- packages/core/src/ui/use-key-input.test.ts
- packages/core/src/ui/use-key-input.ts
Also add *.bun-build to .gitignore. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
♻️ Duplicate comments (4)
packages/core/src/ui/index.ts (1)
65-65:⚠️ Potential issue | 🟠 MajorPublic UI barrel introduces incompatible export renames/removals.
Line 137-138 exports only
useHotkey/UseHotkeyArgs, so consumers importing previous key-binding symbols from this barrel will break at compile time. Line 65 also reflects the prompt contract surface shift, which compounds public API migration impact. Please provide compatibility aliases (or explicitly treat this as a documented breaking release).As per coding guidelines (`**`: “Flag only … Breaking changes (incompatible API changes, removed exports)”).Suggested compatibility alias patch (non-breaking transition)
-export { useHotkey } from './use-key-binding.js' -export type { UseHotkeyArgs } from './use-key-binding.js' +export { useHotkey, useHotkey as useKeyBinding } from './use-key-binding.js' +export type { + UseHotkeyArgs, + UseHotkeyArgs as UseKeyBindingArgs, +} from './use-key-binding.js'Also applies to: 137-138
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/core/src/ui/index.ts` at line 65, The public UI barrel removed/renamed exports (e.g., PromptProps and prior key-binding symbols) causing breaking changes; add compatibility aliases in packages/core/src/ui/index.ts by re-exporting the old symbol names to the new implementations (for example export oldKeyName = useHotkey and oldKeyArgs = UseHotkeyArgs or re-export PromptProps from its new location) so existing consumers still compile, or explicitly mark this as a breaking change in the release notes if you intend to remove them permanently; update the export list around the useHotkey/UseHotkeyArgs and PromptProps declarations to include these compatibility aliases.packages/core/src/ui/prompts/confirm.tsx (1)
16-17:⚠️ Potential issue | 🟠 MajorBreaking API change:
ConfirmPropsdroppedisDisabledcompatibility.Line 16 and Line 55 introduce an incompatible prop rename for external consumers still using
isDisabled. Add a deprecated alias and resolve todisabledinternally.Proposed compatibility patch
export interface ConfirmProps extends PromptProps { + /** `@deprecated` Use `disabled` instead. */ + readonly isDisabled?: boolean /** Label for the affirmative choice. `@default` "Yes" */ readonly active?: string @@ export function Confirm({ @@ focused = true, - disabled = false, + disabled, + isDisabled, }: ConfirmProps): ReactElement { + const resolvedDisabled = disabled ?? isDisabled ?? false const [value, setValue] = useState(defaultValue) @@ - { isActive: focused && !disabled } + { isActive: focused && !resolvedDisabled } ) @@ - <ConfirmChoice label={active} isActive={value} disabled={disabled} /> + <ConfirmChoice label={active} isActive={value} disabled={resolvedDisabled} /> @@ - <ConfirmChoice label={inactive} isActive={!value} disabled={disabled} /> + <ConfirmChoice label={inactive} isActive={!value} disabled={resolvedDisabled} />As per coding guidelines "Review with high signal only. Flag only: Breaking changes (incompatible API changes, removed exports)."
Also applies to: 55-57, 83-83, 88-90
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/core/src/ui/prompts/confirm.tsx` around lines 16 - 17, ConfirmProps removed backward-compatible isDisabled prop causing a breaking API change; add a deprecated alias so external users can still pass isDisabled. Update the ConfirmProps type to accept isDisabled?: boolean (marked deprecated) and ensure the component (Confirm) resolves isDisabled into the existing disabled property (e.g., const resolvedDisabled = disabled ?? isDisabled) so internal logic and rendering use resolvedDisabled; also update any prop destructuring/usage locations (ConfirmProps, Confirm component render/handlers) to reference resolvedDisabled and add a short deprecation comment for isDisabled.packages/core/src/ui/prompts/autocomplete.tsx (1)
21-22:⚠️ Potential issue | 🟠 Major
AutocompletePropsrename (isDisabled→disabled) is still a breaking public API change.Line 21 and Line 67 remove compatibility for existing callers passing
isDisabled. This should either ship behind a major-version boundary or keep a deprecated alias temporarily.Proposed compatibility patch
export interface AutocompleteProps<TValue> extends PromptProps { + /** `@deprecated` Use `disabled` instead. */ + readonly isDisabled?: boolean /** The full list of selectable options. */ readonly options: readonly PromptOption<TValue>[] @@ export function Autocomplete<TValue>({ @@ focused = true, - disabled = false, + disabled, + isDisabled, }: AutocompleteProps<TValue>): ReactElement { + const resolvedDisabled = disabled ?? isDisabled ?? false @@ - { isActive: focused && !disabled } + { isActive: focused && !resolvedDisabled } ) @@ - disabled={disabled} + disabled={resolvedDisabled} @@ - disabled={disabled} + disabled={resolvedDisabled}As per coding guidelines "Review with high signal only. Flag only: Breaking changes (incompatible API changes, removed exports)."
Also applies to: 67-69, 152-152, 160-160, 180-180
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/core/src/ui/prompts/autocomplete.tsx` around lines 21 - 22, The public API change renaming AutocompleteProps property isDisabled → disabled is breaking; restore backward compatibility by keeping the new disabled property but accept the old isDisabled as a deprecated alias in AutocompleteProps and in the consuming component(s) (e.g., wherever AutocompleteProps is destructured/used) map isDisabled to disabled (preferencing explicit disabled if both present), add a deprecation comment/JSdoc on isDisabled, and add a small runtime warning or test to ensure callers using isDisabled continue to work until the next major release; reference the AutocompleteProps interface and the component render/handler functions that consume that prop to locate where to add the alias mapping.packages/core/src/ui/prompts/select-key.tsx (1)
15-16:⚠️ Potential issue | 🟠 MajorBreaking API change:
isDisabledwas removed from exported props without compatibility shim.Line 15 and Line 41 remove support for previous callers using
isDisabled, which is an incompatible public API change. Keep a deprecated alias for at least one release window (or explicitly ship as a major-version break).Proposed compatibility patch
export interface SelectKeyProps<TValue extends string> extends PromptProps { + /** `@deprecated` Use `disabled` instead. */ + readonly isDisabled?: boolean /** Options where each `value` is a single key character. */ readonly options: readonly PromptOption<TValue>[] @@ export function SelectKey<TValue extends string>({ options, onSubmit, focused = true, - disabled = false, + disabled, + isDisabled, }: SelectKeyProps<TValue>): ReactElement { + const resolvedDisabled = disabled ?? isDisabled ?? false useInput( @@ - { isActive: focused && !disabled } + { isActive: focused && !resolvedDisabled } ) @@ - <KeyOptionRow key={option.value} option={option} disabled={disabled} /> + <KeyOptionRow key={option.value} option={option} disabled={resolvedDisabled} /> ))}As per coding guidelines "Review with high signal only. Flag only: Breaking changes (incompatible API changes, removed exports)."
Also applies to: 41-43, 54-54, 60-60
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/core/src/ui/prompts/select-key.tsx` around lines 15 - 16, SelectKeyProps<TValue> removed the public isDisabled prop, causing a breaking API change; re-add a deprecated optional isDisabled?: boolean to the exported SelectKeyProps<TValue> interface as a compatibility alias and ensure the SelectKey component (and any related handlers) map isDisabled to the existing disabled/internal prop (e.g., treat props.isDisabled as props.disabled when present), add a deprecation comment on isDisabled, and keep this shim for at least one release (or explicitly document as a major-version break) so existing callers continue to work.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@packages/core/src/ui/index.ts`:
- Line 65: The public UI barrel removed/renamed exports (e.g., PromptProps and
prior key-binding symbols) causing breaking changes; add compatibility aliases
in packages/core/src/ui/index.ts by re-exporting the old symbol names to the new
implementations (for example export oldKeyName = useHotkey and oldKeyArgs =
UseHotkeyArgs or re-export PromptProps from its new location) so existing
consumers still compile, or explicitly mark this as a breaking change in the
release notes if you intend to remove them permanently; update the export list
around the useHotkey/UseHotkeyArgs and PromptProps declarations to include these
compatibility aliases.
In `@packages/core/src/ui/prompts/autocomplete.tsx`:
- Around line 21-22: The public API change renaming AutocompleteProps property
isDisabled → disabled is breaking; restore backward compatibility by keeping the
new disabled property but accept the old isDisabled as a deprecated alias in
AutocompleteProps and in the consuming component(s) (e.g., wherever
AutocompleteProps is destructured/used) map isDisabled to disabled (preferencing
explicit disabled if both present), add a deprecation comment/JSdoc on
isDisabled, and add a small runtime warning or test to ensure callers using
isDisabled continue to work until the next major release; reference the
AutocompleteProps interface and the component render/handler functions that
consume that prop to locate where to add the alias mapping.
In `@packages/core/src/ui/prompts/confirm.tsx`:
- Around line 16-17: ConfirmProps removed backward-compatible isDisabled prop
causing a breaking API change; add a deprecated alias so external users can
still pass isDisabled. Update the ConfirmProps type to accept isDisabled?:
boolean (marked deprecated) and ensure the component (Confirm) resolves
isDisabled into the existing disabled property (e.g., const resolvedDisabled =
disabled ?? isDisabled) so internal logic and rendering use resolvedDisabled;
also update any prop destructuring/usage locations (ConfirmProps, Confirm
component render/handlers) to reference resolvedDisabled and add a short
deprecation comment for isDisabled.
In `@packages/core/src/ui/prompts/select-key.tsx`:
- Around line 15-16: SelectKeyProps<TValue> removed the public isDisabled prop,
causing a breaking API change; re-add a deprecated optional isDisabled?: boolean
to the exported SelectKeyProps<TValue> interface as a compatibility alias and
ensure the SelectKey component (and any related handlers) map isDisabled to the
existing disabled/internal prop (e.g., treat props.isDisabled as props.disabled
when present), add a deprecation comment on isDisabled, and keep this shim for
at least one release (or explicitly document as a major-version break) so
existing callers continue to work.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ea28ebb7-dc3d-47b9-84d0-77194b3adf86
⛔ Files ignored due to path filters (1)
.changeset/input-isolation-prompt-props.mdis excluded by!.changeset/**
📒 Files selected for processing (12)
.gitignorepackages/core/src/ui/index.tspackages/core/src/ui/prompts/autocomplete.tsxpackages/core/src/ui/prompts/confirm.tsxpackages/core/src/ui/prompts/group-multi-select.tsxpackages/core/src/ui/prompts/multi-select.tsxpackages/core/src/ui/prompts/password-input.tsxpackages/core/src/ui/prompts/path-input.tsxpackages/core/src/ui/prompts/select-key.tsxpackages/core/src/ui/prompts/select.tsxpackages/core/src/ui/prompts/text-input.tsxpackages/core/src/ui/use-key-binding.ts
- macOS terminals send \x7f (DEL) for Backspace, which ink reports as key.delete. Both key.backspace and key.delete now do backspace (delete before cursor). Forward-delete uses Ctrl+D. - Stories-app shortcuts (q/r/b/i/?) now only fire in browse mode, preventing key conflicts with TextInput in edit mode. Co-Authored-By: Claude <noreply@anthropic.com>
Add a new `preview` mode between browse and edit, giving users a read-only view of the story with props visible but not editable. Mode flow: browse → Enter → preview → Enter → edit preview → i → interactive → Esc Esc → preview edit → Esc → preview → Esc → browse - `preview` mode: preview panel highlighted, props visible (read-only), shortcuts for i (interactive), Enter (edit), r (reset), Esc (browse) - `edit` mode: only Esc to exit, no other shortcuts (clean text input) - `interactive` mode: returns to preview instead of browse - Updated status bar, help overlay, and keyboard hints for all modes Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/core/src/stories/viewer/components/preview.tsx (1)
159-165:⚠️ Potential issue | 🟠 MajorPreview mode locks tabbed props to the first field.
isFocused={editable}isfalsein preview mode, andPropsEditorforwards that into the tabbed editor.packages/core/src/ui/layout/tabs.tsx(Lines 60-82) disables tab input whenisFocusedis false, so any story with multiple prop groups becomes unreadable in preview because users cannot switch tabs. Read-only preview still needs navigation separate from field editability.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/core/src/stories/viewer/components/preview.tsx` around lines 159 - 165, Preview mode sets isFocused={editable} on PropsEditor causing the tabbed UI to be disabled when editable is false; change the behavior so navigation remains enabled in read-only preview. Update PropsEditor to accept a separate prop (e.g., navigationEnabled or isTabNavigationEnabled) and use that when rendering the tabbed component instead of forwarding isFocused; alternatively, when rendering PropsEditor from the preview component, pass isFocused={true} (or the new navigation prop=true) while keeping editable=false so fields remain read-only but tabs remain navigable; reference PropsEditor and the tab disabling logic in the tabbed component (tabs.tsx) to ensure tab input is controlled by the new navigation flag, not the edit focus flag.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/core/src/stories/viewer/components/status-bar.tsx`:
- Around line 52-56: The status bar is rendering QuitHint for edit mode via the
match(...).otherwise branch while the actual 'q' shortcut is only handled in
stories-app.tsx for browse and preview; update the rendering logic in
status-bar.tsx so QuitHint is only shown when mode is 'browse' or 'preview'
(e.g., use match(mode).with('browse', ...).with('preview', ...).otherwise(() =>
null)), or alternatively add the 'q' key handling for edit mode in
stories-app.tsx to match the hint; reference the match(...) call, the mode
variable, and the QuitHint component when making the change.
In `@packages/core/src/stories/viewer/stories-app.tsx`:
- Around line 151-180: The input handler uses multiple chained ifs; replace it
with a ts-pattern match() on the relevant input/key state (e.g., match({ input,
key, selectedStory, showHelp })) and express each branch as a pattern arm: when
showHelp is true return; when key.return && selectedStory != null call
enterEditMode; when key.escape call exitPreviewMode; when input === 'i' &&
selectedStory != null call enterInteractiveMode; when input === 'r' call
handleResetProps; when input === 'q' call exit; when input === '?' call
setShowHelp(true); when input === 'b' toggle sidebar via setShowSidebar(prev =>
!prev). Apply the same conversion for the second useInput handler around the
182-200 region so both multi-branch handlers follow the ts-pattern match()
style.
---
Outside diff comments:
In `@packages/core/src/stories/viewer/components/preview.tsx`:
- Around line 159-165: Preview mode sets isFocused={editable} on PropsEditor
causing the tabbed UI to be disabled when editable is false; change the behavior
so navigation remains enabled in read-only preview. Update PropsEditor to accept
a separate prop (e.g., navigationEnabled or isTabNavigationEnabled) and use that
when rendering the tabbed component instead of forwarding isFocused;
alternatively, when rendering PropsEditor from the preview component, pass
isFocused={true} (or the new navigation prop=true) while keeping editable=false
so fields remain read-only but tabs remain navigable; reference PropsEditor and
the tab disabling logic in the tabbed component (tabs.tsx) to ensure tab input
is controlled by the new navigation flag, not the edit focus flag.
🪄 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: 19bd918c-5ae8-408d-bc07-ab4035acacdf
📒 Files selected for processing (5)
packages/core/src/stories/viewer/components/help-overlay.tsxpackages/core/src/stories/viewer/components/preview.tsxpackages/core/src/stories/viewer/components/status-bar.tsxpackages/core/src/stories/viewer/hooks/use-panel-focus.tspackages/core/src/stories/viewer/stories-app.tsx
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Summary
PromptPropsinterface (focused,disabled) extended by all 9 prompt componentsInputBlock/useInputBlockcontext-based input gating and@inkjs/uidependencyuseInputproxy — all components importuseInputdirectly frominkkey.backspaceandkey.deletenow do backspace (macOS sends\x7fwhich ink reports askey.delete). Forward-delete uses Ctrl+D.previewmode to stories viewer (browse → preview → edit flow)isDisabled→disabledacross all prompts and stories*.bun-buildto.gitignoreMode flow
Test plan
pnpm checkpasses (typecheck + lint + format)pnpm testpasses (1339 tests)ienters interactive, Esc returns to browsefocuseddefaulting totrue