Repository navigation
layout(shell): Make Data Model default tab and reduce debug height - #231
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces initial layout proportions and constraints for the ComposerDockview service, ensuring panels like the Gemini Assistant, Rendered Preview, JSON Editor, and Debug Drawer are initialized with realistic dimensions. It also adds comprehensive unit tests to verify these layout configurations. The review feedback highlights a few areas for improvement: updating JSDoc comments that still describe the old tabbed layout instead of the new side-by-side split, removing redundant default parameter fallbacks in the private buildDockviewLayout method, eliminating a premature call to enforceInitialProportions before the layout is initialized, and wrapping test spies in a try...finally block to prevent test pollution in case of assertion failures.
⚡ A2UI Composer PR PreviewYour automated preview is successfully live (commit
|
suyangw-g
left a comment
There was a problem hiding this comment.
Code Review Summary (PR #231)
Reviewed against Google TypeScript/Angular readability (go/tsstyle), lifecycle invariants, and layout constraints. Note also that PR #232 (shared-preview-editor-layout) is stacked directly on top of this branch's commits (4c17ae6, 836eddd) and replaces the 50/50 side-by-side split here with a shared tab group (direction: 'within').
See inline comments for P1 findings.
Set Data Model as the active default tab in the workspace debug drawer by configuring inactive flags on Events, Errors, and Raw Messages. Split the debug drawer below Rendered Preview before adding the JSON Editor so the debug drawer spans across the full width below both preview and editor panels. Balance the upper row with an equal 50/50 width split between Rendered A2UI Preview and A2UI JSON Editor. Reduce initial debug drawer height to 28% of container height and enforce Assistant width to not exceed 1/3 of the container width. Add desktop fallback constants (1280x800) and JSDoc documentation. Add unit tests verifying Data Model default selection, debug drawer height ratio, spanning width, and 50/50 preview/editor split.
- Update class and method JSDocs to describe side-by-side 50/50 split layout instead of tabbed layout. - Remove redundant parameter defaults in buildDockviewLayout. - Remove premature enforceInitialProportions call before layout pass. - Wrap HTMLElement prototype spies in try-finally in workspace tests to avoid spy leakage on assertion failures.
- Guard onDidActivePanelChange and onDidLayoutChange until initialization completes to prevent spurious GA4 telemetry and early persistence. - Remove redundant dataModelPanel setActive call in initial layout. - Add minimumWidth and minimumHeight constraints to A2UI JSON Editor. - Capture and restore Storage.prototype.getItem spy in finally block.
…derer The catalog-aware system prompt now ends with main's custom instructions (a2ui-project#233), the Assistant panel takes main's width settings (a2ui-project#231), and the README drops the removed MCP sample while keeping the Slack sample.
Description
Set Data Model as the active default tab in the workspace debug drawer by configuring inactive flags on Events, Errors, and Raw Messages.
Split the debug drawer below Rendered Preview before adding the JSON Editor so the debug drawer spans across the full width below both preview and editor panels.
Balance the upper row with an equal 50/50 width split between Rendered A2UI Preview and A2UI JSON Editor.
Reduce initial debug drawer height to 28% of container height and enforce Assistant width to not exceed 1/3 of the container width. Add desktop fallback constants (1280x800) and JSDoc documentation. Add unit tests verifying Data Model default selection, debug drawer height ratio, spanning width, and 50/50 preview/editor split.
Pre-launch Checklist