Skip to content

feat: TUI visual overhaul, community files and demo animation (v1.4.0)#62

Merged
shouze merged 4 commits intomainfrom
feat/tui-visual-overhaul-and-community-files
Feb 27, 2026
Merged

feat: TUI visual overhaul, community files and demo animation (v1.4.0)#62
shouze merged 4 commits intomainfrom
feat/tui-visual-overhaul-and-community-files

Conversation

@shouze
Copy link
Contributor

@shouze shouze commented Feb 27, 2026

Summary

Visual refresh of the TUI to align with the brand illustration on the documentation site, plus all the community and discoverability files that were missing from the repository.


TUI visual changes (src/render.ts, src/tui.ts)

Before After
Blue (bgBlue) cursor highlight Violet (bgMagenta) — matches brand colour
/ checkboxes (green) when selected, space when not — cleaner line
/ fold arrows (grey dim) / in violet (magenta)
Plain bold title GitHub Code Search: Brand badge on violet background
Match count inline Right-aligned to terminal edge (termWidth-aware)
Section separators in bold Section separators in magenta

process.stdout.columns is now forwarded from tui.ts to renderGroups via the termWidth option.

Tests updated for the new / arrows.

New files

File Purpose
SECURITY.md RSSI-approved vulnerability disclosure policy
CODE_OF_CONDUCT.md Contributor Covenant 2.1
docs/public/social-preview.svg 1280×640 GitHub social preview image
demo/demo.tape VHS tape — records the animated demo
demo/demo.gif Recorded demo animation embedded in README
demo/README.md Instructions to regenerate the GIF

README improvements

  • Embedded demo/demo.gif animation
  • New Features section (8 capabilities)
  • New Use cases section (5 concrete scenarios with commands)
  • New Why not gh search code? section with comparison table

package.json

  • 18 keywords added for npm/pkg discoverability
  • Version bumped 1.3.0 → 1.4.0 (minor — new value, no breaking changes)

How to verify

bun test          # 359 pass, 0 fail
bun run lint      # 0 errors
bun run format:check
bun run knip

Then build and run the TUI to see the visual changes:

bun run build.ts
export GITHUB_TOKEN=ghp_...
./dist/github-code-search query "useState" --org <your-org>

Copilot AI review requested due to automatic review settings February 27, 2026 10:31
@github-actions
Copy link

Coverage after merging feat/tui-visual-overhaul-and-community-files into main will be

96.38%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.47%100%100%97.40%158–161
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze force-pushed the feat/tui-visual-overhaul-and-community-files branch from 2170943 to bee93ac Compare February 27, 2026 10:32
@shouze shouze self-assigned this Feb 27, 2026
@github-actions
Copy link

Coverage after merging feat/tui-visual-overhaul-and-community-files into main will be

96.38%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.47%100%100%97.40%158–161
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

Copy link
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 refreshes the interactive TUI styling to better match the project’s branding, and adds several community/discoverability assets (policy docs, demo assets, social preview), along with README updates and a version bump for v1.4.0.

Changes:

  • Updated TUI visuals (icons/colours) and introduced termWidth forwarding to support right-aligned match counts.
  • Updated rendering tests for new fold/unfold arrow glyphs.
  • Added community files (SECURITY / Code of Conduct), demo assets/instructions, social preview SVG, README improvements, and bumped package version + keywords.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/tui.ts Forwards terminal width (process.stdout.columns) into render options.
src/render.ts TUI visual overhaul (new glyphs/colours) and new right-aligned match count rendering using termWidth.
src/render.test.ts Updates expectations for new fold/unfold arrow glyphs.
package.json Bumps version to 1.4.0 and adds npm keywords.
docs/public/social-preview.svg Adds GitHub social preview image asset.
demo/demo.tape Adds VHS tape script to record the demo animation.
demo/README.md Adds instructions to regenerate the demo GIF.
SECURITY.md Adds vulnerability disclosure policy.
README.md Embeds demo GIF and adds features/use-cases/comparison sections.
CODE_OF_CONDUCT.md Adds Contributor Covenant Code of Conduct.

- Replace blue cursor highlight with violet (magenta) for brand consistency
- Replace ◉/○ checkboxes with ✓ (green) / space for a cleaner look
- Right-align match counts to terminal edge (termWidth-aware)
- Replace ▶/▼ fold arrows with ▸/▾ in brand violet
- Add brand badge header (bgMagenta) in TUI title bar
- Colour section separators with magenta
- Pass process.stdout.columns to renderGroups via tui.ts

- Add SECURITY.md (RSSI-approved vulnerability disclosure policy)
- Add CODE_OF_CONDUCT.md (Contributor Covenant 2.1)
- Add docs/public/social-preview.svg (1280×640 GitHub social image)
- Add demo/demo.tape (VHS tape for animated demo GIF)
- Add demo/demo.gif (recorded demo animation)
- Add demo/README.md (regeneration instructions)
- Add 18 keywords to package.json for npm/pkg discoverability
- Expand README.md: Features, Use cases, Why not gh search code? sections

Bump: 1.3.0 → 1.4.0 (minor)
@shouze shouze force-pushed the feat/tui-visual-overhaul-and-community-files branch from bee93ac to b876222 Compare February 27, 2026 10:43
@github-actions
Copy link

Coverage after merging feat/tui-visual-overhaul-and-community-files into main will be

96.38%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.47%100%100%97.40%158–161
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

- Remove parentheses from sticky repo header match count (visual
  consistency with repo rows)
- Fix termWidth padding off-by-one: termWidth - leftLen - countLen
  (was subtracting an extra 1, leaving line one column short)
- Add renderGroups unit test asserting right-aligned row fits termWidth
- Fix README: 'organisation' → 'organization' (consistent American spelling)
- Fix SECURITY.md: 'Reporting security vulnerability Issues'
  → 'Reporting security vulnerabilities'
- Fix SECURITY.md: 'In any ways' → 'In any case'
- Update docs/usage/interactive-mode.md: reflect new TUI glyphs
  (▸/▾ arrows, ✓/space checkboxes, right-aligned counts, brand badge)
@github-actions
Copy link

Coverage after merging feat/tui-visual-overhaul-and-community-files into main will be

96.38%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.47%100%100%97.40%158–161
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

Copy link
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

Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.

PR review fixes (3 new comments):
- src/render.ts: fix padding overflow — use Math.max(0, ...) and omit
  space when pad=0 rather than forcing a minimum 1-space gap that could
  push lines past termWidth
- README.md: align comparison table with docs/index.md (center alignment
  for ✓/✗ columns, :---:)
- README.md: typo 'secrets patterns' → 'secret patterns'

CONTRIBUTING.md:
- Remove stale 'No linter is configured yet' sentence
- Document actual tools: oxlint (bun run lint) and oxfmt
  (bun run format / bun run format:check)

package.json:
- Add repository, homepage, bugs fields for npmjs.com discoverability

CHANGELOG.md:
- Create minimal root CHANGELOG.md pointing to the VitePress blog
  for visitors expecting a standard changelog at the repo root
@github-actions
Copy link

Coverage after merging feat/tui-visual-overhaul-and-community-files into main will be

96.38%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.48%100%100%97.42%158–161
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@github-actions
Copy link

Coverage after merging feat/tui-visual-overhaul-and-community-files into main will be

96.38%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.48%100%100%97.42%158–161
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze force-pushed the feat/tui-visual-overhaul-and-community-files branch from 2bd7777 to 1dcccb1 Compare February 27, 2026 11:13
@shouze shouze requested a review from Copilot February 27, 2026 11:13
@github-actions
Copy link

Coverage after merging feat/tui-visual-overhaul-and-community-files into main will be

96.38%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts97.48%100%100%97.42%158–161
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze merged commit a19cd89 into main Feb 27, 2026
10 checks passed
@shouze shouze deleted the feat/tui-visual-overhaul-and-community-files branch February 27, 2026 11:14
Copy link
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

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.


lines.push(pc.bold(`GitHub Code Search: ${pc.cyan(query)} in ${pc.yellow(org)}`));
lines.push(
`${pc.bgMagenta(pc.bold(" github-code-search "))} ${pc.bold(pc.cyan(query))} ${pc.dim("in")} ${pc.bold(pc.yellow(org))}`,
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The header badge applies bgMagenta but doesn’t set a foreground colour, so on light-theme terminals (default black fg) the badge text can become hard to read. Consider forcing a contrasting foreground (e.g., white) for the badge text to ensure consistent readability across terminal themes.

Suggested change
`${pc.bgMagenta(pc.bold(" github-code-search "))} ${pc.bold(pc.cyan(query))} ${pc.dim("in")} ${pc.bold(pc.yellow(org))}`,
`${pc.bgMagenta(pc.white(pc.bold(" github-code-search ")))} ${pc.bold(pc.cyan(query))} ${pc.dim("in")} ${pc.bold(pc.yellow(org))}`,

Copilot uses AI. Check for mistakes.
Comment on lines +182 to +185
const leftPart = `${arrow} ${checkbox} ${repoName}`;
const leftLen = stripAnsi(leftPart).length;
const countLen = stripAnsi(count).length;
const pad = Math.max(0, termWidth - leftLen - countLen);
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The right-alignment math uses stripAnsi(...).length, which counts UTF-16 code units rather than terminal column width. Repo/org/query strings containing emoji, CJK, or other full-width characters will misalign (and may overflow). Consider using a display-width calculation (e.g., a small width helper or a dependency like string-width) for padding calculations.

Copilot uses AI. Check for mistakes.
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.

2 participants