Skip to content

fix(workspace): smooth panel resizing and restore theme accents - #2870

Merged
openai0229 merged 2 commits into
mainfrom
fix/workspace-resize-theme-accent
Sep 3, 2026
Merged

openai0229 merged 2 commits into
mainfrom
fix/workspace-resize-theme-accent

Conversation

@openai0229

Copy link
Copy Markdown
Contributor

Related issue

N/A - requested and validated directly as a workspace interaction fix.

Summary

  • Commit outer workspace panel sizes only after dragging finishes so continuous pointer movement does not serialize the persisted workspace state.
  • Keep unsplit workspace content and Monaco's internal viewport attached to their live container edges during sidebar resizing, while preserving the existing split-editor measurement path.
  • Preserve the default theme accent when a datasource has no custom identity color, and use the same theme fallback for enabled editor watermarks.
  • Keep explicit datasource identity colors authoritative for tree decoration, tab accents, selector marks, and watermarks.

Affected surfaces

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

Verification

  • Commands and results:
    • yarn install --frozen-lockfile - passed.
    • yarn test:workspace-tab-scroll - passed, including the new null/undefined/empty accent fallback coverage.
    • yarn test:data-source-identity - passed.
    • yarn test:data-source-watermark - passed.
    • yarn lint - passed.
    • yarn build:web:community --app_version=0.0.0 - passed, including all configured prebuild tests and production bundle verification.
  • Manual verification:
    • Playwright CLI covered 2048x1060 and 1024x768 viewports, a real 23-database tree, a real Monaco SQL editor, 40 mocked history records, panel collapse/reopen, reload persistence, and vertical/horizontal editor splits.
    • A 270-frame reversing left drag, 180-frame right drag, and 161-frame narrow drag kept tree nodes, content bounds, Monaco, and the right scrollbar at 0 px geometry drift; each completed drag persisted the workspace once and produced no long tasks.
    • With no custom datasource color, workspace and query-result active tabs used the live theme primary color and an enabled watermark used that color at 40% opacity. With #F5222D, the explicit color overrode tabs, tree decoration, selector mark, and watermark.
    • No unexpected console errors, page errors, or failed requests were observed.
  • UI evidence: Playwright CLI computed-style, DOM-geometry, persistence-count, and runtime-error assertions are summarized above; no generated binary evidence was committed.

Risk and compatibility

  • Public API or stored data: N/A - no API, schema, storage key, or persisted payload shape changes.
  • Database or driver compatibility: N/A - no database or driver code changes.
  • Network, privacy, or security: N/A - no network or data-access behavior changes.
  • Community / Local / Pro boundary: Community shared frontend only; Studio has no overrides for the changed components and will inherit the behavior after its Community ref is updated from the merged commit.
  • Backward compatibility: Existing panel widths, custom identity colors, editor split layouts, and datasource color persistence remain compatible.

Reviewer map

  • Start here: chat2db-community-client/src/pages/main/workspace/index.tsx, WorkspaceRight/index.tsx, WorkspaceTabs/index.tsx, then src/components/Tabs/tabAccentColor.ts.
  • Failure condition: panel drag writes the workspace store more than once, the tree or Monaco edges drift during resize, or a null datasource color makes the active tab accent transparent.
  • Rollback or disable path: revert commits b8aa245a6 and 3ca2412b1.

Contributor declaration

  • I linked the Issue that defines this change. N/A - no Issue was supplied.
  • 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: OpenAI Codex traced the resize and color flows, implemented the changes, added the focused regression test, and ran the reported automated and Playwright CLI verification. The resulting diff was reviewed before submission.

@openai0229
openai0229 requested review from a team and Aias00 as code owners September 3, 2026 05:05
@openai0229 openai0229 moved this to In Review in Chat2DB Community Sep 3, 2026
@openai0229
openai0229 merged commit 2036991 into main Sep 3, 2026
18 of 19 checks passed
@openai0229
openai0229 deleted the fix/workspace-resize-theme-accent branch September 3, 2026 05:13
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Sep 3, 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.

1 participant