Skip to content

Add visual console command for terminal-based database table browsing#1

Closed
Copilot wants to merge 9 commits intomainfrom
copilot/create-console-database-visualization
Closed

Add visual console command for terminal-based database table browsing#1
Copilot wants to merge 9 commits intomainfrom
copilot/create-console-database-visualization

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 10, 2026

Implements a terminal UI alternative to REPL for browsing database tables without writing code. Addresses user requirement: "提供一个极简的控制台,让用户可以可视化的操作数据库里面的表,而不是用repl"

Implementation

New Command

  • objectql console (alias: c) - Launches blessed-based TUI with split-pane layout
  • Left panel: object/table list, right panel: paginated data grid (20 rows/page)
  • Detail overlay: press Enter on any row to view full record
  • Keyboard nav: ↑↓/jk navigate, Tab switch panes, n/p page, r refresh, ? help

Architecture

  • Uses ObjectRepository with system context (same privilege model as REPL)
  • Lazy-loads data on object selection, caches current page
  • Config file discovery matches existing CLI commands (objectql.config.ts/js)

Dependencies

  • Added blessed@^0.1.81 and blessed-contrib@^4.11.0 to CLI package

Usage

objectql console

# Navigate to "projects" object → see paginated table
# Press Enter on row 2 → detail overlay shows all fields
# Press Escape → back to table, press q → quit

Files Changed

  • packages/cli/src/commands/console.ts - Core implementation (426 lines)
  • packages/cli/src/index.ts - Command registration
  • packages/cli/package.json - Dependencies
  • Documentation: docs/console.md, docs/guide/cli.md, READMEs

Visual comparison: REPL requires JavaScript knowledge; console exposes data through direct visual browsing.

Original prompt

我希望能提供一个极简的控制台,让用户可以可视化的操作数据库里面的表,而不是用repl


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 10, 2026 11:17
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Add console for database table visualization Add visual console command for terminal-based database table browsing Jan 10, 2026
Copilot AI requested a review from hotlong January 10, 2026 11:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a terminal-based visual console command (objectql console) as an alternative to the REPL for browsing database tables. The feature addresses a user requirement for a visual interface to operate database tables without writing code.

Changes:

  • Added new console command to CLI with blessed-based TUI featuring split-pane layout, pagination, and keyboard navigation
  • Added comprehensive documentation including user guide, demo screenshots, and updated CLI documentation
  • Included example initialization script for sample data to demonstrate the console functionality

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/cli/src/commands/console.ts Core implementation of visual console with blessed UI framework (426 lines)
packages/cli/src/index.ts Command registration for new console command with alias 'c'
packages/cli/package.json Added blessed and blessed-contrib dependencies for terminal UI
packages/cli/README.md Documentation for console command usage and keyboard shortcuts
docs/console.md Comprehensive user guide for visual console feature
docs/console-demo.md ASCII art demo screenshots showing console interface
docs/guide/cli.md Updated CLI guide with console command section
examples/basic-app/init-data.ts Sample data initialization script for testing console
examples/basic-app/package.json Added console script and ts-node dependency
README.md Updated roadmap to mark Phase 4.5 (Visual Console) as complete
CONSOLE_IMPLEMENTATION.md Implementation summary and technical details
pnpm-lock.yaml Lock file updates for new blessed dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@hotlong hotlong marked this pull request as ready for review January 11, 2026 13:59
hotlong and others added 5 commits January 11, 2026 22:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

3 participants