Skip to content

Fix issue with inspector column overflow when dragging past max size - #308

Merged
jgindin merged 3 commits into
a2ui-project:mainfrom
dustinwhuang:inspector-resize
Oct 29, 2026
Merged

jgindin merged 3 commits into
a2ui-project:mainfrom
dustinwhuang:inspector-resize

Conversation

@dustinwhuang

Copy link
Copy Markdown
Contributor

Description

  • Constrain inspector-column width so it no longer keeps increasing after resize handle is dragged past maximum.
  • Start pointer and keyboard resizing from inspector-column clientWidth to avoid deadzone when resizing inspector after it has been dragged past max.

Pre-launch Checklist

  • I signed the [CLA].
  • I read the [Contributors Guide].
  • I read the [Style Guide].
  • I have added updates to the [CHANGELOG].
  • I updated/added relevant documentation.
  • My code changes (if any) have tests.
  • If my branch is on fork, I have verified that scripts/e2e_test.sh passes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the inspector resizing logic to start from the actual rendered column width (using clientWidth) rather than the state-tracked width, preventing unexpected jumps during resizing. It also adds corresponding unit tests and adjusts flexbox styles for the resize handle and column. The review feedback suggests avoiding the fragile nextElementSibling DOM traversal by querying the .inspector-column class from the parent element instead.

Comment thread shell/src/app/agent-chat/a2a-chat-view.ts Outdated
Comment thread shell/src/app/agent-chat/a2a-chat-view.ts Outdated
@dustinwhuang
dustinwhuang marked this pull request as ready for review October 29, 2026 17:18
}

protected handleInspectorResizeKey(event: KeyboardEvent): void {
const target = event.currentTarget instanceof HTMLElement ? event.currentTarget : null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment explaining what the target and target.nextElementSibling represent here? E.g., which on-screen elements are these?

Also, add comment -- why would event.target not be an HTMLElement?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comment for startWidth/currentWidth and changed to as HTMLElement.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

⚡ A2UI Composer PR Preview

Your automated preview is successfully live (commit 2e087d0):
👉 Launch PR Preview

Note: This environment will be wiped automatically when the PR is merged or closed.

@jgindin
jgindin merged commit 4a98989 into a2ui-project:main Oct 29, 2026
13 checks passed
@dustinwhuang
dustinwhuang deleted the inspector-resize branch October 29, 2026 21:17
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.

2 participants