Ink setup - #11
Conversation
Add comprehensive Ink setup documentation with TypeScript/JSX configuration, feature-based architecture structure, and development workflow. Remove completed test plan document that is no longer relevant after test implementation.
Replace legacy terminal UI implementation with Ink framework. Add React/TypeScript support with JSX configuration, update module system to ESM, and configure React Hooks linting. Replace ts-node with tsx for faster development workflow. Add Ink testing library and create initial App component with quit functionality. Update build configuration to support .tsx files and ESM output format.
…reen structure Add react-router dependency and implement MemoryRouter-based navigation with three screens (Home, Settings, Game). Create type-safe navigation wrapper with ROUTES constants and custom useNavigate hook that enforces RoutePath type. Add ESLint rule to restrict direct react-router imports and require using @navigation wrapper. Update App component to use Routes/Route instead of basic Ink components. Remove alternateScreen
…t screen Remove ts-node, ts-node-dev, and tsconfig-paths dependencies. Replace dev:ink script with separate dev:hot:build (tsup watch) and dev:hot:run (node watch) scripts for improved hot reload workflow. Add clickable terminal links to t3core and t3core-cli npm packages in About screen using ANSI OSC 8 escape sequences.
…el build watch and run Replace separate dev:hot:build and dev:hot:run scripts with unified dev:ink script that runs tsup watch and node watch concurrently using shell job control. Add concurrently dependency for future parallel task management.
…screen Set MemoryRouter initialEntries to ROUTES.home to ensure consistent starting route. Remove ANSI OSC 8 terminal link formatting from About screen package URLs and display them as plain text instead.
…ment interactive Settings feature Add meow dependency for CLI argument parsing. Support --screen flag to launch app directly into home, settings, game, or about screens. Pass initialScreen prop through App component to MemoryRouter. Implement complete Settings feature with toggle options for Sound, Style, and Arrow Key Navigation, plus Reset to Default and Back to Menu commands. Create SettingsItem component with visual indicators for selected/
Add Zustand and Conf dependencies for state management and persistent storage. Create SettingsRepository service to handle settings persistence using Conf with project-scoped configuration. Implement useSettingsStore with toggle, reset, and load actions that automatically persist changes. Load settings on app initialization before rendering. Remove "Style" setting option and simplify MenuItem component to accept selected boolean prop
…ings configuration Add SETTINGS_KEYS constant object to centralize setting key definitions and derive SettingsKey type from it. Convert SettingsState to Record type for better type safety. Move DEFAULT_SETTINGS declaration before SETTINGS_OPTIONS array. Update SettingsRepository to use SETTINGS_KEYS constants instead of string literals for store operations. Use package.json name for Conf projectName with fallback to "t3core-cli".
…g case-insensitive Move emphasis styling from "Reset to default" to "Back to Menu" command in settings options. Convert --screen flag value to lowercase before route lookup to support case-insensitive screen names.
…I components, and input handling Add full game implementation with t3core game engine integration. Create Game component with Board, GameHeader, GameStatus, PlayerPrompt, GameHint, GameInfo, and InputError subcomponents. Implement gameEngine wrapper around t3core Game class with subscription-based state management and snapshot access. Add useGameInput hook with support for numeric input (1-9), arrow key navigation, history mode
… with beep on navigation and moves Add --sound, --arrowKey, and --mobile CLI flags to override settings at startup. Apply CLI flag overrides after loading persisted settings in index.ts. Add --mobile flag as shorthand to disable arrow key navigation. Implement beep() sound effects on navigation between screens, player moves in game (both arrow key and numeric input), and app exit. Add BELL constant for terminal bell character
Add canary-release npm script that runs new canary-release.sh script. Implement complete canary release workflow with pre-flight checks (git state, npm auth), version parsing, automatic canary number detection from npm registry, quality checks (lint, ts:check, test, build), temporary package.json bump, npm publish with canary tag, and automatic package.json restoration via trap cleanup.
Comment out test execution in canary-release.sh with TODO note to re-enable when tests are ready.
Create new Header component displaying "Tic Tac Toe" title in bordered box with version number. Move Header outside MemoryRouter in App component to persist across all screens. Remove title and version display from Menu component to avoid duplication.
Extract settings initialization and CLI flag processing from index.ts into new appInit utility function. Create MenuList component to encapsulate menu options rendering logic. Change menu item selection color from green to cyan. Remove "Enter Select" from arrow key navigation hint in Menu component.
Extract version display into reusable AppVersion component. Move version from Header to Home and About screens. Add bottom border to About screen title, style package links with magenta color and underline, add newline spacing, and change "Packages:" label from dimColor to bold.
Restructure Game component layout by removing GameHeader and reorganizing content flow. Extract Board rendering logic into separate BoardRow, BoardItem, and Border components with constants file. Update Container to accept all Box props and spread them, add width="100%" default. Improve spacing and alignment throughout Game screen - center board, add conditional Newline for input errors, adjust hint margins. Change GameInfo border
Add comprehensive documentation analyzing the Game feature architecture and planning MVVM + Data Adapter refactor. Create game-feature-analysis.md documenting current structure with feature-based organization, Adapter/Facade pattern for gameEngine, External Store pattern with useSyncExternalStore, Reducer pattern for UI state, MVVM separation, and Data Adapter for Board. Create game-refactor-plan.md outlining three-phase refactor: extract
Add quit instruction to GameHint component. Refactor backToMove to return boolean success status from gameEngine through to useGameInput. Simplify parseHistoryInput to only handle number input and return success status. Add beep sound and auto-toggle history mode on successful move selection. Remove unused key.return and space bar handling from history input parsing.
Import BackToMoveStatus and PlayerMoveStatus types from t3core. Update GameEngine interface to return status types from savePlayerMove and backToMove methods instead of void/boolean. Update gameEngine implementation to return status directly from game methods. Update useGameViewModel commands to return status types and propagate them from engine calls. Update useGameInput to check status === "success" instead of boolean. Change
…back Add useMemo to Board grid calculation and Border middleChars generation. Wrap BoardItem, BoardRow, and Border components in memo. Convert useGameViewModel functions to useCallback and memoize commands object. Optimize useSettingsInput and useSettingsToggleOption to select only needed store values. Add useCallback to Game handleOptionSelect.
Create generic List component for rendering data arrays with custom render function. Add NavList component that wraps List with navigation indicators (arrow or numbered). Extract NavListIndicator component to handle indicator rendering logic. Refactor MenuItem to only handle label rendering, removing navigation indicator logic. Update MenuList to use NavList component with renderItem prop.
…ngsItem Add color prop to NavList and NavListIndicator to customize indicator color (defaults to cyan). Add keyExtractor prop to NavList for custom key generation. Update MenuList and SettingsList to use NavList with keyExtractor. Remove navigation indicator logic from SettingsItem component and simplify to only handle label and value rendering. Remove unused props (arrowNav, index) from SettingsItem.
Remove MenuList and SettingsList wrapper components. Move NavList rendering and renderItem callbacks directly into Menu and Settings components. Add MenuOption and SettingsOption type exports to constants files. Memoize renderItem callbacks with useCallback to optimize re-renders.
…avList in HistoryList Replace nested conditional returns in GameMessages with renderMessage helper function using early returns. Update HistoryList to use NavList component with getMoves helper function. Remove unused arrowNav and index props from MenuItem component. Comment out unused RouteName type export.
Add historySelectedIndex to UIState to track selected move in history mode. Add NAVIGATE_HISTORY action to handle up/down navigation through history with wrapping. Reset historySelectedIndex to 0 when toggling history mode. Pass historySelectedIndex to GameMessages component. Update arrow navigation hints to show "Navigate history" and "Select move" when in history mode.
Add numberOffset prop to NavList component with default value of 1. Update NavListIndicator number calculation to use index + numberOffset. Set numberOffset to 0 in HistoryList to start numbering from 0 instead of 1.
…al feedback Add dimColor prop to Board, BoardRow, and BoardItem components. Pass ui.historyMode as dimColor to Board in Game component. Thread dimColor through BoardRow to BoardItem where it's applied to Text component to dim board colors when viewing history.
…ry feature Add showHistory boolean setting to SettingsState with default value false. Add "Show Game History" toggle option to settings menu. Thread showHistory prop through GameFooter and getGameFooterHints to conditionally show history-related hints and controls. Update useArrowNavInput and useGameViewModel to check showHistory before allowing history toggle. Add showHistory to SettingsRepository persistence, useSettingsStore sel
…ry feature Remove showHistory check from useArrowNavInput to allow history toggle attempt. Add error message "History is disabled" in useGameViewModel toggleHistory when showHistory setting is false. Remove unused showHistory selector from useArrowNavInput.
Export createSettingsStore function from useSettingsStore for testing purposes. Remove obsolete test files including settings helper, game view tests, settings view tests, app tests, header tests, and game component tests.
…Store type Remove unused ink-testing-library from devDependencies. Add package.json to fallow ignore list. Change SettingsStore type from exported to internal-only in useSettingsStore.
|
Important Review skippedToo many files! This PR contains 296 files, which is 196 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (296)
You can disable this status message by setting the 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 |
…sed feature descriptions
… functions with unit tests Move useArrowNavInput hook into directory structure with index export. Extract input handling logic from useArrowNavInput into handleArrowNavInput module with separate functions for interaction keys, history navigation, and board navigation. Add comprehensive unit tests covering all input handling scenarios including arrow keys, Enter/space confirmation, and mode-specific navigation.
Fallow health reportNo GitHub PR/MR findings. Generated by fallow. |
…ect directory structure
…ith unit tests Move validation logic from GlobalInput component into validateSubmission module. Add ValidationResult type to represent success, error, and skip states. Add comprehensive unit tests covering validation with and without schema, coercion, error handling, and beep behavior.
…organize useGameViewModel into directory structure Move GameCommands type from useGameViewModel into separate types.ts module. Reorganize useGameViewModel hook into directory structure with index export. Update import paths in useArrowNavInput modules to reference new types location.
Release v1.6.0
Complete UI rewrite — migrates the CLI from a legacy command-line interface to an interactive Ink-based React UI with persistent settings, game history, and arrow-key navigation.
Before
After
Changelog
1.6.0 - 2026-08-13
Requirements
Added
--screen,--sound,--arrowNav,--showHistory,--mobilei)q→y/n)Changed
dimColorfor history mode visual feedbackNavListcomponent supportsnumberOffsetandkeyExtractorprops for customizable renderingFixed
isSpecialKeyin go-back navigation now correctly checks key pressed state instead of key name existence