feat(cli): add ui-next Solid/OpenTUI TUI stack#11248
feat(cli): add ui-next Solid/OpenTUI TUI stack#11248hannesrudolph wants to merge 3 commits intomainfrom
Conversation
Sync review of 3c42178 (lockfile update after removing React/Ink deps). No new issues found -- the lockfile changes are consistent with
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| { exitOnCtrlC: false }, | ||
| ) | ||
| // Resolve the ui-next bundle path relative to CLI package root | ||
| const cliRoot = process.env.ROO_CLI_ROOT || path.resolve(__dirname, "..") |
There was a problem hiding this comment.
cliRoot resolves incorrectly in dev mode. __dirname here points to src/commands/cli/, so path.resolve(__dirname, "..") yields src/commands/ -- not the CLI package root. This means tuiBundlePath resolves to src/commands/dist/ui-next/main.js, which doesn't exist. The bundled (tsup) case works because __dirname is dist/, going up one lands at the package root. The existing extension-host.ts solves this with findCliPackageRoot() (walks up to the nearest package.json); the same approach would work here.
| const cliRoot = process.env.ROO_CLI_ROOT || path.resolve(__dirname, "..") | |
| const cliRoot = process.env.ROO_CLI_ROOT || findCliPackageRoot(__dirname) |
Fix it with Roo Code or mention @roomote and request a fix.
| function handleAutocompleteDismiss() { | ||
| batch(() => { | ||
| setActiveTrigger(null) | ||
| setShowHelp(false) | ||
| setAutocompleteItems([]) | ||
| }) | ||
| // Clear trigger char from input | ||
| if (textareaRef) { | ||
| textareaRef.clear() | ||
| } | ||
| } |
There was a problem hiding this comment.
Dismissing the autocomplete overlay (via Escape or Ctrl+C) calls textareaRef.clear(), which erases the entire input. If a user types look at @fi and then presses Escape to dismiss the file autocomplete, they lose "look at " as well. The comment says "Clear trigger char from input" but the code clears everything. Consider either leaving the text as-is on dismiss (just clear autocomplete state), or removing only the trigger portion (@fi) while preserving the text before it.
Fix it with Roo Code or mention @roomote and request a fix.
|
|
||
| try { | ||
| writeFileSync(tmpFile, initialContent, "utf-8") | ||
| execSync(`${editor} ${tmpFile}`, { stdio: "inherit" }) |
There was a problem hiding this comment.
Using string interpolation in execSync means editors whose paths contain spaces or shell metacharacters (e.g. $EDITOR="/Applications/My Editor.app/...") will break or behave unexpectedly. Using execFileSync(editor, [tmpFile], { stdio: "inherit" }) avoids shell interpretation entirely and handles paths with spaces correctly.
| execSync(`${editor} ${tmpFile}`, { stdio: "inherit" }) | |
| execFileSync(editor, [tmpFile], { stdio: "inherit" }) |
Fix it with Roo Code or mention @roomote and request a fix.
…cy UI - Delete entire src/ui/ directory (~80 files of React/Ink components, hooks, stores) - Remove react, ink, @inkjs/ui, zustand, @types/react, ink-testing-library deps - Move @opentui/core-darwin-arm64 to optionalDependencies with all 5 platform variants - Remove unused opentui-spinner dependency - Chain build scripts: 'build' now runs tsup && bun build-ui-next.ts - Clean tsup.config.ts: restore clean:true, remove React JSX config - Clean tsconfig.json: remove jsx/jsxImportSource React settings Architecture improvements: - Decompose prompt God Component (502→194 LOC + 5 extracted modules) - Extract shared extension-logic.ts (295 LOC pure functions) - Eliminate test harness duplication, fix missing todo handling bug - Relocate tools.ts from ui/utils/ to lib/utils/ - Port onboarding from React/Ink to pure Node.js terminal prompts - Type dynamic import with UINextModule interface - Replace all 'as any' casts with precise types - Fix context-window.ts broken @/ui/store.js import - Fix all lint warnings (unused imports, prefer-const, no-control-regex) Verification: tsc clean, 350 tests pass, zero React/Ink/Zustand references, lint clean
|
Generated with ❤️ by ellipsis.dev |
Summary
Adds a new SolidJS/OpenTUI-based
ui-nextruntime for the CLI and wires the run command to launch the prebuilt bundle.Changes
ui-nextapplication layer with routes, contexts, components, and utility modules.src/ui-next/main.tsxintodist/ui-next/main.js.ui-nextbundle.Important
Introduces a new SolidJS/OpenTUI-based TUI stack for the CLI, adding new components, contexts, utilities, and tests, while updating the build process.
ui-nextruntime using SolidJS/OpenTUI for CLI TUI.run()inrun.tsto dynamically import and start the TUI.startTUI()function inmain.tsxto initialize TUI.App,Home,Session,Prompt,Logo,Tips,SessionHeader,SessionFooter,ChatMessage,ApprovalPrompt,FollowupPrompt,AutocompleteOverlay,HelpOverlay,HorizontalLine,DialogOverlay,ToastDisplaycomponents.autocomplete,border,help-overlay,logo,prompt,tips,dialog,spinner,toastcomponents.ThemeProvider,RouteProvider,ExitProvider,ToastProvider,KeybindProvider,DialogProvider,ExtensionProvidercontexts.createSimpleContext()inhelper.tsxfor context creation.clipboard.ts,editor.ts,terminal.tsfor clipboard, editor, and terminal utilities.getTerminalBackgroundColor(),copyToClipboard(),openEditor()functions.logo-data,triggers,extension,spinner,clipboard,editor,terminalutilities.detectTrigger(),formatRelativeTime(),truncateText(),getReplacementText()intriggers.test.ts.build-ui-next.tsscript for building TUI with Bun.package.jsonandtsup.config.tsfor new dependencies and build process.tsconfig.ui-next.jsonfor TUI-specific TypeScript configuration.This description was created by
for 88092ec. You can customize this summary. It will automatically update as commits are pushed.