Skip to content

Ink Upgrade Flicker Validation#645

Merged
arul28 merged 1 commit into
mainfrom
ade/context-skill-start-then-ade-e2cf9393
Jun 24, 2026
Merged

Ink Upgrade Flicker Validation#645
arul28 merged 1 commit into
mainfrom
ade/context-skill-start-then-ade-e2cf9393

Conversation

@arul28

@arul28 arul28 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Refs ADE-102

Summary

Describe the change.

What Changed

Key files and behaviors.

Validation

How you tested.

Risks

Anything to watch.

Linked Linear issues

ADE   Open in ADE  ·  ade/context-skill-start-then-ade-e2cf9393 branch  ·  PR #645

Summary by CodeRabbit

  • New Features

    • Improved prompt editing in the CLI, including proper forward-delete support alongside existing backspace behavior.
  • Bug Fixes

    • Fixed cursor and text removal behavior when editing prompts, making character deletion more consistent.
    • Updated the CLI’s React-related runtime packages to newer versions for better compatibility.

Greptile Summary

This PR upgrades the ADE Code terminal UI stack and adjusts input-test coverage. The main changes are:

  • Bumps the CLI TUI from Ink 5 / React 18 to Ink 7 / React 19.
  • Adds a prompt delete helper that separates Backspace from forward Delete.
  • Wraps polling test render and unmount paths in React act setup.
  • Updates ADE Code docs to describe the independent Ink 7 / React 19 stack.

Confidence Score: 5/5

The changes appear merge-safe based on the reviewed dependency upgrade, input handling adjustment, test updates, and documentation edits.

No code issues were identified in the reviewed changes, and the updates are focused on the terminal UI stack migration with corresponding test coverage adjustments.

T-Rex T-Rex Logs

What T-Rex did

  • The upgrade path from base commit 8c99c4b with ink@5.2.1 and react@18.3.1 to head commit 602cd11 with ink@7.1.0 and react@19.2.7 was exercised, npm ci completed successfully, and focused TUI test collection failed due to a missing module during app input/polling collection.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. General comment

    P1 Head cannot execute the focused ADE Code TUI prompt/polling tests

    • Bug
      • The migrated ADE CLI package installs and resolves the expected Ink 7 / React 19 dependency tree, but the focused runtime tests requested for the changed TUI path fail during test collection on head. npm test -- src/tuiClient/__tests__/appInput.test.ts src/tuiClient/__tests__/appPolling.test.tsx exits 1 before running any tests, so the PR's runtime contract for prompt input and polling behavior is not demonstrated by executable tests.
    • Cause
      • During collection, importing the TUI app/test dependency graph triggers a module resolution failure for yaml: Cannot find module './compose/composer.js', with the require stack reported as /home/user/repo/apps/ade-cli/yaml; appPolling shows this while importing src/tuiClient/app.tsx around its model/provider imports. This prevents both focused suites from loading.
    • Fix
      • Fix the test/runtime module resolution so yaml resolves to the installed package under node_modules during vitest collection, then rerun the focused TUI tests under Node 22. Verify appInput.test.ts and appPolling.test.tsx collect and execute successfully against the Ink 7 / React 19 stack.

    T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "Upgrade ADE Code terminal renderer" | Re-trigger Greptile

@linear-code

linear-code Bot commented Jun 24, 2026

Copy link
Copy Markdown

ADE-102

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Jun 24, 2026 5:52am

@arul28

arul28 commented Jun 24, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@mintlify

mintlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ade-ac1c6011 🟢 Ready View Preview Jun 24, 2026, 5:53 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds an exported deletePromptForKey helper in app.tsx that dispatches to forward or backward prompt deletion based on the pressed key, replacing two unconditional backward-delete call sites. Bumps ink to ^7.1.0, react to ^19.2.7, and @types/react to ^19.2.17, and adapts polling tests for React 19's act environment requirements.

Changes

deletePromptForKey helper

Layer / File(s) Summary
deletePromptForKey implementation and call sites
apps/ade-cli/src/tuiClient/app.tsx
New exported deletePromptForKey helper dispatches to deletePromptForward when the key is Delete-only, otherwise to deletePromptBackward. Both the footer handler and the main chat prompt handler are updated to call this helper instead of always deleting backward.
Unit tests
apps/ade-cli/src/tuiClient/__tests__/appInput.test.ts
Imports deletePromptForKey and adds two assertions covering backspace-delete (produces hell world, cursor 4) and forward-delete (produces helloworld, cursor 5) semantics.

React 19 / Ink 7 upgrade and polling test adaptation

Layer / File(s) Summary
Dependency version bumps
apps/ade-cli/package.json
ink bumped from ^5.2.1 to ^7.1.0, react from ^18.3.1 to ^19.2.7, and @types/react from ^18.3.28 to ^19.2.17.
React 19 act environment fixes in polling tests
apps/ade-cli/src/tuiClient/__tests__/appPolling.test.tsx
Adds beforeAll/afterAll to toggle IS_REACT_ACT_ENVIRONMENT for the suite. Introduces renderApp and unmountApp helpers that wrap render/unmount in act then call flushAsyncEffects. All polling test cases are refactored to use these helpers for render and cleanup.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and aligns with the main theme of the PR: the Ink/React upgrade work related to flicker validation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/context-skill-start-then-ade-e2cf9393

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

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 `@apps/ade-cli/package.json`:
- Around line 43-57: Update the dependency set in package.json to use a testing
library version compatible with Ink 7 and React 19, since the current
ink-testing-library peer range only targets Ink 5. Replace the outdated
ink-testing-library entry in the package’s dependencies/devDependencies with a
version that supports Ink 7, keeping the rest of the package manifest aligned
with the existing Node 22 and React 19 setup.
🪄 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: CHILL

Plan: Pro

Run ID: c31fd914-8320-4ac8-9cf6-c9ad9566be15

📥 Commits

Reviewing files that changed from the base of the PR and between 8c99c4b and 602cd11.

⛔ Files ignored due to path filters (3)
  • apps/ade-cli/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
  • docs/ARCHITECTURE.md is excluded by !docs/**
  • docs/features/ade-code/README.md is excluded by !docs/**
📒 Files selected for processing (4)
  • apps/ade-cli/package.json
  • apps/ade-cli/src/tuiClient/__tests__/appInput.test.ts
  • apps/ade-cli/src/tuiClient/__tests__/appPolling.test.tsx
  • apps/ade-cli/src/tuiClient/app.tsx

Comment thread apps/ade-cli/package.json
@arul28 arul28 merged commit 919be29 into main Jun 24, 2026
27 checks passed
@arul28 arul28 deleted the ade/context-skill-start-then-ade-e2cf9393 branch June 24, 2026 06:08
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