Skip to content

style: simplify TUI borders — remove redundant nested frames - #64

Merged
nazozokc merged 2 commits into
mainfrom
AI-agent
Jun 29, 2026
Merged

style: simplify TUI borders — remove redundant nested frames#64
nazozokc merged 2 commits into
mainfrom
AI-agent

Conversation

@nazozokc

@nazozokc nazozokc commented Jun 29, 2026

Copy link
Copy Markdown
Owner

変更内容

TUI画面内のネストされたボーダーを削除し、見た目を整理した。

変更ファイル

ファイル 変更
src/tui/screens/detail.tsx Notes部の single ボーダーを paddingLeft に変更
src/tui/screens/config.tsx 設定一覧の round 外枠ボーダーを削除
src/tui/screens/subscription-form.tsx ヒントバーの single ボーダーをプレーンテキストに変更
src/tui/screens/delete.tsx 詳細セクションのボーダーを削除、未使用コード(cardWidth等)を除去

背景

メインフレーム(app.tsxround ボーダー)の内側で各スクリーンが独自に round または single のボーダーを重ねていたため、二重枠/三重枠になっていた。外枠の中では、ボーダーではなくパディング/ディバイダーで構造を示すように統一した。,

Summary by CodeRabbit

  • Style
    • Simplified several terminal UI screens by removing extra borders and heavy padding.
    • Streamlined spacing and layout in configuration, detail, delete, and subscription form views.
    • Adjusted the delete screen to use a more flexible layout without terminal-size-based width constraints.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@nazozokc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2f2fb3b9-7116-42fb-85c9-559e4f48d03d

📥 Commits

Reviewing files that changed from the base of the PR and between 211f149 and 585b4a0.

📒 Files selected for processing (2)
  • subtrack/src/tui/screens/delete.tsx
  • subtrack/src/tui/screens/detail.tsx
📝 Walkthrough

Walkthrough

Four TUI screens (config.tsx, delete.tsx, detail.tsx, subscription-form.tsx) have their container Box styling simplified: gray rounded borders, padding props, and terminal-size-based width calculations (useWindowSize, SIDEBAR_WIDTH, cardWidth) are removed, replaced with plain flexDirection="column" and padding-only containers.

Changes

TUI Screen Border/Padding Cleanup

Layer / File(s) Summary
Remove borders and dynamic width constraints
subtrack/src/tui/screens/delete.tsx, subtrack/src/tui/screens/config.tsx, subtrack/src/tui/screens/detail.tsx, subtrack/src/tui/screens/subscription-form.tsx
Drops useWindowSize, SIDEBAR_WIDTH, and cardWidth from DeleteScreen; removes borderStyle, borderColor, and padding props from container Box elements in all four screens, replacing them with simpler flex/padding-only layouts.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • nazozokc/subtrack#52: This PR directly reverts the useWindowSize/SIDEBAR_WIDTH-driven cardWidth layout that PR #52 introduced in delete.tsx.
  • nazozokc/subtrack#49: PR #49 performed visual polish on the same TUI screens touched here.
  • nazozokc/subtrack#45: PR #45 introduced the ConfigScreen, DeleteScreen, and SubscriptionForm components whose render layout is being simplified here.

Poem

🐇 No more borders round my hay,
No padding left to get in the way,
I stripped the gray and kept it plain,
A simpler Box — less to maintain,
Hop hop hooray, clean layout day! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the PR’s main change: simplifying TUI borders by removing redundant nested frames.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch AI-agent

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@subtrack/src/tui/screens/delete.tsx`:
- Line 1: The delete TUI details card no longer has a width cap, so long values
can stretch the screen beyond the terminal frame. Update the card rendering in
the delete screen component to restore a terminal-aware max width on the main
card or apply truncation/wrapping to the value cells, using the delete screen’s
card/layout code and the row/value rendering logic that builds the details
table. Keep the card contained so long subscription names or tag lists do not
expand the UI horizontally.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 91dbcdaf-c910-4d7c-b360-7cc9c50555b6

📥 Commits

Reviewing files that changed from the base of the PR and between e025023 and 211f149.

📒 Files selected for processing (4)
  • subtrack/src/tui/screens/config.tsx
  • subtrack/src/tui/screens/delete.tsx
  • subtrack/src/tui/screens/detail.tsx
  • subtrack/src/tui/screens/subscription-form.tsx

@@ -1,13 +1,11 @@
import { Box, Text, useInput, useWindowSize } from "ink"
import { Box, Text, useInput } from "ink"

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Restore a width cap for the details card.

Removing cardWidth here means the card now grows to the longest value row. A long subscription name or tag list will push this screen past the terminal width instead of staying contained in the app frame. Please keep a terminal-aware max width or add truncation/wrapping on the value cells before merging.

Also applies to: 72-95

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@subtrack/src/tui/screens/delete.tsx` at line 1, The delete TUI details card
no longer has a width cap, so long values can stretch the screen beyond the
terminal frame. Update the card rendering in the delete screen component to
restore a terminal-aware max width on the main card or apply truncation/wrapping
to the value cells, using the delete screen’s card/layout code and the row/value
rendering logic that builds the details table. Keep the card contained so long
subscription names or tag lists do not expand the UI horizontally.

@nazozokc
nazozokc merged commit 671064b into main Jun 29, 2026
12 checks passed
@nazozokc
nazozokc deleted the AI-agent branch June 29, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant