Skip to content

fix(client): render first workspace terminal tab - #2789

Merged
openai0229 merged 1 commit into
mainfrom
fix/first-terminal-render
Aug 28, 2026
Merged

openai0229 merged 1 commit into
mainfrom
fix/first-terminal-render

Conversation

@openai0229

Copy link
Copy Markdown
Contributor

Related issue

Closes #2788

Summary

Re-run workspace pane measurement when the workspace tab count changes. An empty workspace does not render the split-box ref, so the initial layout effect exits early. Opening the first terminal keeps the normalized split layout null, which previously prevented the effect from running again and left the terminal body hidden without pane bounds.

The added dependency initializes pane bounds and the resize observer when the first tab mounts. The fix is shared workspace lifecycle behavior and does not add terminal-specific or commercial product branching.

Affected surfaces

  • Frontend / Web
  • Backend / API / Storage
  • Database plugin / Driver
  • JCEF / Desktop packaging
  • CI / Build / Release
  • Documentation only

Verification

  • Commands and results:
    • yarn test:workspace-split-lifecycle - passed.
    • yarn lint - passed with zero warnings.
    • yarn run build:web:community --app_version=0.0.0 - passed, including the configured Community prebuild test suite and production bundle verification.
    • yarn run build:web:desktop --app_version=5.3.5 in Chat2DB Studio - passed; 212 bundled endpoints, 180 normalized paths, 354 backend owners, and the Pro composition bundle were verified.
    • mvn clean package -f chat2db-studio-server/pom.xml -Dchat2db.product=pro -Pbridge-fat - passed with Studio Maven tests.
  • Manual verification: Replaced the Pro 5.3.0 desktop jar and dist with the rebuilt Pro 5.3.5 bridge-fat artifacts on macOS 27.0. Opening the integrated terminal as the first workspace tab displayed the shell prompt and cursor successfully.
  • UI evidence: Before the change the first terminal tab had a blank body; after the replacement build the shell prompt and cursor were visible.

Risk and compatibility

  • Public API or stored data: No API, persistence, or storage changes.
  • Database or driver compatibility: N/A; no database or driver code changed.
  • Network, privacy, or security: No network or security behavior changed.
  • Community / Local / Pro boundary: The fix stays in Community workspace layout lifecycle code. Studio/Pro consume the shared renderer without adding commercial behavior to Community.
  • Backward compatibility: Existing tab and split layouts keep the same measurement behavior. Tab-count changes now recreate the observer after cleanup, covering the previously missed empty-to-first-tab transition.

Reviewer map

  • Start here: chat2db-community-client/src/pages/main/workspace/components/WorkspaceTabs/index.tsx, at the pane-content measurement useLayoutEffect dependency list.
  • Failure condition: Starting from an empty workspace and opening the first terminal leaves paneContentBounds empty, so the active tab body remains hidden.
  • Rollback or disable path: Revert commit 38cbb9e3aa02b56e24933b9a39ea324473283f65.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: Substantial AI assistance was used for runtime diagnosis, implementation, and verification.

@openai0229
openai0229 requested a review from a team as a code owner August 28, 2026 07:58
@openai0229 openai0229 moved this to In Review in Chat2DB Community Aug 28, 2026
@openai0229
openai0229 merged commit 109643c into main Aug 28, 2026
16 checks passed
@openai0229
openai0229 deleted the fix/first-terminal-render branch August 28, 2026 08:01
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Integrated terminal is blank when opened as the first workspace tab

1 participant