Skip to content

fix(app): prevent file tree tab clipping and open legacy picker at home - #63

Merged
A-x6 merged 2 commits into
bolt-builder:devfrom
anomalyco:dev
Jul 31, 2026
Merged

A-x6 merged 2 commits into
bolt-builder:devfrom
anomalyco:dev

Conversation

@A-x6

@A-x6 A-x6 commented Jul 31, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.


View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

Summary by CodeRabbit

  • Bug Fixes

    • Improved directory selection fallback behavior when a home path is unavailable.
    • Preserved protocol validation and error handling for fallback directory loading.
  • UI Improvements

    • Increased the minimum session file-tree width to 240px.
    • Updated panel resizing to consistently enforce the new minimum width.

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

@opencode-agent[bot] is attempting to deploy a commit to the adevloper152's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Hey! Your PR title Upstream fetch doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No issue referenced. Please add Closes #<number> linking to the relevant issue.
  • "How did you verify your code works?" section is empty. Please explain how you tested.
  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

1 similar comment
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No issue referenced. Please add Closes #<number> linking to the relevant issue.
  • "How did you verify your code works?" section is empty. Please explain how you tested.
  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The directory selector now loads its fallback path only when the home path is missing. The session side panel now enforces a 240px minimum file-tree width during layout and resizing.

Changes

Directory fallback

Layer / File(s) Summary
Fallback path activation
packages/app/src/components/dialog-select-directory.tsx
Fallback path loading now activates when the home path is missing.

File-tree sizing

Layer / File(s) Summary
Minimum file-tree width
packages/app/src/pages/session/session-side-panel.tsx
The file-tree width is clamped to 240px for panel layout and resize handling.

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

Suggested reviewers: brendonovich

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description leaves the issue, implementation rationale, verification, screenshots, and checklist incomplete, and retains template instructions instead of providing PR details. Add the issue number, describe the implementation and rationale, document verification, include UI screenshots or recordings, and complete the checklist.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly summarizes both main changes: preventing file-tree clipping and opening the legacy picker at the home directory.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@A-x6

A-x6 commented Jul 31, 2026

Copy link
Copy Markdown
Author

@codesmith-bot what change does this pr exactly do?

@blacksmith-sh

blacksmith-sh Bot commented Jul 31, 2026

Copy link
Copy Markdown

Got it, I'm reviewing the PR changes now.

@github-actions

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

@blacksmith-sh

blacksmith-sh Bot commented Jul 31, 2026

Copy link
Copy Markdown

@DevFlex-AI

@codesmith-bot what change does this pr exactly do?

This PR is an upstream sync: it pulls two commits from anomalyco's dev branch into bolt-builder/bolt-cli's dev. Both are small UI fixes in packages/app:

  1. fix(app): prevent file tree tab clipping (7ea343c) - In session-side-panel.tsx, introduces a FILE_TREE_WIDTH_MIN = 240 constant and clamps the file tree panel width to Math.max(240, layout.fileTree.width()). Previously a persisted width below the minimum (the resize handle allowed 200px) could render the file tree too narrow and clip its tabs; the resize handle's min is also raised from 200 to 240.

  2. fix(app): open legacy picker at home (d3f30df) - In dialog-select-directory.tsx, the fallback path resource for the legacy (v1 protocol) directory picker now triggers whenever sync.data.path.home is missing, instead of only when both home and directory are missing. This makes the legacy picker resolve and open at the home directory correctly when only directory is set.

No other changes; net diff is 2 files, ~8 lines each.

View with [code]smith

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 `@packages/app/src/components/dialog-select-directory.tsx`:
- Around line 60-62: Update the picker’s initial path selection around the start
value to prefer fallbackPath()?.home before sync.data.path.directory, while
preserving the existing home-path precedence and fallback behavior.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2468ea58-8400-4a29-a453-c536a4710605

📥 Commits

Reviewing files that changed from the base of the PR and between 21d57f3 and d3f30df.

📒 Files selected for processing (2)
  • packages/app/src/components/dialog-select-directory.tsx
  • packages/app/src/pages/session/session-side-panel.tsx

Comment on lines +60 to +62
const missingHome = createMemo(() => !sync.data.path.home)
const [fallbackPath] = createResource(
() => (missingBase() ? true : undefined),
() => (missingHome() ? true : undefined),

@coderabbitai coderabbitai Bot Jul 31, 2026

Copy link
Copy Markdown

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

Use the fallback home directory as the initial location.

When sync.data.path.home is missing but sync.data.path.directory exists, this change loads the fallback path. However, start at Lines 74-76 still selects sync.data.path.directory before fallbackPath()?.home. The picker therefore does not open at the fallback home directory.

If the picker must open at home, prefer the fallback home before sync.data.path.directory.

Proposed fix
-    () => sync.data.path.home || sync.data.path.directory || fallbackPath()?.home || fallbackPath()?.directory,
+    () => sync.data.path.home || fallbackPath()?.home || sync.data.path.directory || fallbackPath()?.directory,
🤖 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 `@packages/app/src/components/dialog-select-directory.tsx` around lines 60 -
62, Update the picker’s initial path selection around the start value to prefer
fallbackPath()?.home before sync.data.path.directory, while preserving the
existing home-path precedence and fallback behavior.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

False positive: fallbackPath is only fetched when both sync.data.path.home and sync.data.path.directory are missing (missingBase gate at line 60-62), so when directory exists fallbackPath() is always undefined and the proposed reorder is a behavioral no-op.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Skipped: comment is from another GitHub bot.

@A-x6 A-x6 changed the title Upstream fetch fix(app): prevent file tree tab clipping and open legacy picker at home Jul 31, 2026
@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⚠️ Branch updated during autofix.

The branch was updated while autofix was in progress. Please try again.

@A-x6
A-x6 merged commit 9d17df6 into bolt-builder:dev Jul 31, 2026
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants