Skip to content

Fix bug with WaveAI panel growing in size when vtabs were open#3097

Merged
sawka merged 2 commits intomainfrom
sawka/fix-waveai-panel-size
Mar 21, 2026
Merged

Fix bug with WaveAI panel growing in size when vtabs were open#3097
sawka merged 2 commits intomainfrom
sawka/fix-waveai-panel-size

Conversation

@sawka
Copy link
Member

@sawka sawka commented Mar 20, 2026

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: dbfd8a33-3c94-4854-9f23-3f6d8ef99072

📥 Commits

Reviewing files that changed from the base of the PR and between 884884f and a9f9d79.

📒 Files selected for processing (2)
  • frontend/app/workspace/workspace-layout-model.ts
  • frontend/app/workspace/workspace.tsx

Walkthrough

The pull request refactors the workspace layout model's state management for the left tab bar. It removes the global vtabVisibleAtom Jotai atom and instead derives tab visibility during initialization. Width persistence is now tracked through a new vtabPanelWrapperRef wrapper element. The initialization logic is simplified by removing the initialized guard and calling initializeFromMeta() directly in the constructor. Debounced persistence functions are updated to read the current wrapper offsetWidth internally rather than accepting width arguments, and all call sites are updated accordingly. The workspace component now derives resize-handle visibility purely from showLeftTabBar and aiPanelVisible states, and passes the new wrapper ref to the layout model during registration.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether the description relates to the changeset. Add a description explaining the bug being fixed, the root cause, and how the changes resolve it.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main bug fix: preventing the WaveAI panel from growing when vertical tabs are open, which aligns with the refactoring of tab visibility tracking in the workspace layout model.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sawka/fix-waveai-panel-size

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 and usage tips.

@cloudflare-workers-and-pages
Copy link

Deploying waveterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: a9f9d79
Status: ✅  Deploy successful!
Preview URL: https://32ad0f82.waveterm.pages.dev
Branch Preview URL: https://sawka-fix-waveai-panel-size.waveterm.pages.dev

View logs

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 20, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • frontend/app/workspace/workspace-layout-model.ts
  • frontend/app/workspace/workspace.tsx

The fix correctly addresses the WaveAI panel growing issue by reading actual rendered widths from DOM refs (offsetWidth) instead of using stale calculated values. The component now derives showLeftTabBar directly from settings, eliminating the sync issue with the removed vtabVisibleAtom.


Reviewed by minimax-m2.5-20260211 · 799,493 tokens

@sawka sawka merged commit 7540b13 into main Mar 21, 2026
8 checks passed
@sawka sawka deleted the sawka/fix-waveai-panel-size branch March 21, 2026 00:48
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.

1 participant