fix(app): prevent file tree tab clipping and open legacy picker at home - #63
Conversation
Co-authored-by: Brendan Allan <git@brendonovich.dev>
|
@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. |
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
📝 WalkthroughWalkthroughThe 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. ChangesDirectory fallback
File-tree sizing
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
@codesmith-bot what change does this pr exactly do? |
|
Got it, I'm reviewing the PR changes now. |
|
The following comment was made by an LLM, it may be inaccurate: |
|
@DevFlex-AI
This PR is an upstream sync: it pulls two commits from
No other changes; net diff is 2 files, ~8 lines each. |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
packages/app/src/components/dialog-select-directory.tsxpackages/app/src/pages/session/session-side-panel.tsx
| const missingHome = createMemo(() => !sync.data.path.home) | ||
| const [fallbackPath] = createResource( | ||
| () => (missingBase() ? true : undefined), | ||
| () => (missingHome() ? true : undefined), |
There was a problem hiding this comment.
🎯 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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Skipped: comment is from another GitHub bot.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. The branch was updated while autofix was in progress. Please try again. |
Issue for this PR
Closes #
Type of change
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
If you do not follow this template your PR will be automatically rejected.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.Summary by CodeRabbit
Bug Fixes
UI Improvements