Skip to content

fix: make the VPN tab responsive to constrained heights - #9027

Merged
jigar-f merged 8 commits into
mainfrom
atavism/windows-vpn-tab-overflow
Sep 10, 2026
Merged

fix: make the VPN tab responsive to constrained heights#9027
jigar-f merged 8 commits into
mainfrom
atavism/windows-vpn-tab-overflow

Conversation

@atavism

@atavism atavism commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

The VPN tab now scrolls when a window is too short, while keeping its usual spacing when everything fits. Long data-usage labels also truncate cleanly instead of overflowing.

Tests cover Pro and free users at the Windows smoke-test size and a smaller viewport. All 243 Flutter tests, focused analysis, and Linux test CI pass.

Summary by CodeRabbit

  • Bug Fixes

    • Improved the data usage card layout by truncating long titles cleanly and maintaining consistent spacing.
    • Updated the VPN tab to remain usable on smaller screens with vertical scrolling.
    • The Pro banner now appears consistently in the VPN tab, including for Pro users.
  • Tests

    • Added coverage for VPN tab behavior across Pro and non-Pro users, including banner actions, controls, and compact-screen scrolling.

Copilot AI lite review requested due to automatic review settings September 2, 2026 16:21
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: cf2d2e3f-00fb-4179-bb07-e6b80733afee

📥 Commits

Reviewing files that changed from the base of the PR and between 5d80b87 and 598b5b5.

📒 Files selected for processing (1)
  • test/features/home/vpn_tab_test.dart

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The home screen updates data usage alignment and makes the VPN tab responsive to constrained heights. The Pro banner now renders for all users. Widget tests cover both viewport sizes and user states.

Changes

Home layout updates

Layer / File(s) Summary
Data usage title layout
lib/features/home/data_usage.dart
The title uses Expanded with one-line ellipsis overflow. The usage spacing appears only when the data cap is not reached.
VPN tab layout and Pro state coverage
lib/features/home/vpn_tab.dart, test/features/home/vpn_tab_test.dart
The VPN tab preserves its minimum height and scrolls when content exceeds the available height. The Pro banner renders for all users. Parameterized tests cover two viewport sizes, Pro and non-Pro states, banner actions, scrolling, and control visibility.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant VpnTab
  participant LayoutBuilder
  participant SingleChildScrollView
  VpnTab->>LayoutBuilder: read available height
  LayoutBuilder->>SingleChildScrollView: provide constrained content
  SingleChildScrollView->>VpnTab: render or scroll VPN tab content
Loading

Merge Risk: ⚪ Minimal · up to 598b5

The VPN tab now scrolls in constrained windows while retaining its spacious layout when content fits, and data-usage text avoids horizontal overflow. No concrete merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: improving VPN tab responsiveness under constrained heights. The related data-usage overflow fix is a secondary change.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch atavism/windows-vpn-tab-overflow

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

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.

🟡 Changes recommended

The new widget test currently leaks global localization state and sets a simulated window size that conflicts with the intended smoke-test dimensions, which can cause order-dependent or misleading test results.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR improves the desktop VPN tab layout so it remains usable in short windows by allowing vertical scrolling when content doesn’t fit, while preserving the existing spaced layout when it does. It also tightens the data-usage header layout to avoid horizontal overflow and adds a widget test intended to cover the Windows smoke-test window size.

Changes:

  • Wrap the VPN tab body in a SingleChildScrollView with a min-height constraint to preserve spaceBetween layout when content fits.
  • Prevent the data-usage heading from overflowing horizontally by constraining it and adding ellipsis overflow handling.
  • Add a widget test to validate the VPN tab scrolls (instead of overflowing) at a constrained desktop size.
File summaries
File Description
test/features/home/vpn_tab_test.dart Adds a widget test to ensure the VPN tab scrolls at a constrained (Windows smoke-test) size.
lib/features/home/vpn_tab.dart Makes the VPN tab vertically scrollable under constrained heights while keeping the spaced layout when possible.
lib/features/home/data_usage.dart Prevents the data-usage heading from overflowing horizontally (ellipsis + flexible layout).
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

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

Comment thread test/features/home/vpn_tab_test.dart Outdated
Comment thread test/features/home/vpn_tab_test.dart Outdated
@atavism

atavism commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@jigar-f Can you please take a look at this one?

@jigar-f jigar-f 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.

LGTM

@jigar-f
jigar-f merged commit 3358683 into main Sep 10, 2026
10 checks passed
@jigar-f
jigar-f deleted the atavism/windows-vpn-tab-overflow branch September 10, 2026 15:25
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