Skip to content

05: Update documentation for Bun 1.4 migration - #164

Merged
shouze merged 2 commits into
feat/bun14-terminal/04-sigwinchfrom
feat/bun14-terminal/05-docs
Aug 23, 2026
Merged

05: Update documentation for Bun 1.4 migration#164
shouze merged 2 commits into
feat/bun14-terminal/04-sigwinchfrom
feat/bun14-terminal/05-docs

Conversation

@shouze

@shouze shouze commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

How did you verify your code works?

@github-actions

Copy link
Copy Markdown

Coverage after merging feat/bun14-terminal/05-docs into feat/bun14-terminal/04-sigwinch will be

96.06%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.80%100%88.24%89.86%167, 191–196, 198–200, 202–203, 224, 411–412, 435–437, 503–507, 519–520, 525–532, 534–542, 544–545
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%
   terminal.ts100%100%100%100%

@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown

🔦 Lighthouse Report

Page ⚡ Perf ♿ A11y 🛡️ BP 🔍 SEO Report
/github-code-search/ 🔴 95 (≥96) 🟢 100 (≥99) 🟢 100 (≥99) 🟢 100 (≥99) 🔗 view
/github-code-search/getting-started/ 🟢 99 (≥96) 🟢 100 (≥99) 🟢 100 (≥99) 🟢 100 (≥99) 🔗 view

Thresholds: Perf ≥ 96 · A11y ≥ 99 · BP ≥ 99 · SEO ≥ 99
commit 35c1dcc · full workflow run

⚠️ One or more error-level assertions failed.

@shouze
shouze force-pushed the feat/bun14-terminal/05-docs branch from bc1ef49 to d6ceda7 Compare August 23, 2026 15:45
@github-actions

Copy link
Copy Markdown

Coverage after merging feat/bun14-terminal/05-docs into feat/bun14-terminal/04-sigwinch will be

96.06%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.78%100%88.24%89.84%166, 190–195, 197–199, 201–202, 223, 410–411, 434–436, 502–506, 518–519, 524–531, 533–541, 543–544
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%
   terminal.ts100%100%100%100%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage after merging feat/bun14-terminal/05-docs into feat/bun14-terminal/04-sigwinch will be

96.06%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.78%100%88.24%89.84%166, 190–195, 197–199, 201–202, 223, 410–411, 434–436, 502–506, 518–519, 524–531, 533–541, 543–544
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%
   terminal.ts100%100%100%100%

@shouze
shouze marked this pull request as ready for review August 23, 2026 15:57
Copilot AI lite review requested due to automatic review settings August 23, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates project documentation to reflect the Bun 1.4 migration and to document terminal/TTY behaviors and the new terminal API wrapper module in the architecture docs.

Changes:

  • Add explicit runtime/token requirements to the README.
  • Expand architecture documentation with SIGWINCH-based resize handling details.
  • Update architecture/component and agent docs to include the src/render/terminal.ts wrapper and Bun ≥ 1.4 requirement.

Reviewed changes

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

File Description
README.md Adds a “Requirements” section describing Bun version and GitHub token scope expectations.
docs/architecture/containers.md Documents live terminal resize handling via SIGWINCH in the TUI flow description.
docs/architecture/components.md Adds src/render/terminal.ts to the render-layer component diagram and table.
AGENTS.md Updates Bun minimum version and documents render/terminal.ts as the sole Bun ANSI API call site.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md
## Requirements

- **Bun** ≥ 1.4 (runtime and package manager)
- **GitHub Token** with `repo` and `read:org` scopes
4. If dimensions have changed, the handler calls `redraw()` to re-render with the new layout.
5. The user sees an immediate, flicker-free refresh without needing to press any key.

When the **TUI** exits (via Ctrl+C, `q`, `Enter`, or `Esc`), the handler is unregistered via `process.off("SIGWINCH", onResize)` to ensure clean cleanup. The **Terminal API wrapper** (`src/render/terminal.ts`) uses `Bun.stringWidth()`, `Bun.stripANSI()`, and `Bun.sliceAnsi()` to measure and truncate text accurately, accounting for emoji, CJK characters, and multi-code-point grapheme clusters.
@github-actions

Copy link
Copy Markdown

Coverage after merging feat/bun14-terminal/05-docs into feat/bun14-terminal/04-sigwinch will be

96.06%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.78%100%88.24%89.84%166, 190–195, 197–199, 201–202, 223, 410–411, 434–436, 502–506, 518–519, 524–531, 533–541, 543–544
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%
   terminal.ts100%100%100%100%

shouze added 2 commits August 23, 2026 18:05
- Update AGENTS.md: Bun >= 1.4 requirement, add terminal.ts module description
- Add architectural rule: terminal.ts is sole Bun API call site
- Update README.md: Add Requirements section with Bun >= 1.4 and GitHub Token scopes
- Update docs/architecture/components.md: Add Terminal API wrapper component
- Update docs/architecture/containers.md: Add Terminal resizing section documenting
  SIGWINCH handler, live redraw, and Bun.Terminal clarification
- Document Unicode handling: emoji, CJK, grapheme clusters

Fixes: #145
@shouze
shouze force-pushed the feat/bun14-terminal/05-docs branch from 142f124 to 0a6f035 Compare August 23, 2026 16:05
@github-actions

Copy link
Copy Markdown

Coverage after merging feat/bun14-terminal/05-docs into feat/bun14-terminal/04-sigwinch will be

96.07%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.80%100%88.24%89.86%166, 190–195, 197–199, 201–202, 223, 411–412, 436–438, 504–508, 520–521, 526–533, 535–543, 545–546
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%
   terminal.ts100%100%100%100%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage after merging feat/bun14-terminal/05-docs into feat/bun14-terminal/04-sigwinch will be

96.07%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.80%100%88.24%89.86%166, 190–195, 197–199, 201–202, 223, 411–412, 436–438, 504–508, 520–521, 526–533, 535–543, 545–546
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%
   terminal.ts100%100%100%100%

@shouze
shouze merged commit 28c2cb5 into main Aug 23, 2026
9 of 12 checks passed
@shouze
shouze deleted the feat/bun14-terminal/05-docs branch August 23, 2026 16:10
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