Constrain tab bar left of update notice
The user is asking about a layout conflict between the "right accessory view" in TitlebarTabsTahoeTerminalWindow.swift and the update accessory view setup in TerminalWindow.swift. They want to constrain the tab bar to always appear left of the update notice.
I should:
- Read both files to understand the current setup
- Identify the conflict
- Propose a solution to constrain the tab bar to appear left of the update notice
Let me read both files first.
I'll examine both files to understand the layout conflict and help constrain the tab bar to appear left of the update notice.
I can see the conflict. In TitlebarTabsTahoeTerminalWindow.swift, the tab bar's layoutAttribute is set to .right (line 59), and it's being constrained to span from left to right edge of the toolbar (lines 145-146). Meanwhile, TerminalWindow.swift also places the update accessory on .right (line 93).
To fix this, we need to constrain the tab bar's right edge to leave space for the update accessory. Let me modify the constraints:
I've constrained the tab bar to leave 160pt of space on the right for the update accessory view. This ensures the tab bar always appears to the left of the update notice without overlapping.
The user is right - we shouldn't use a constant padding because the update accessory view may be hidden (width 0) or have a dynamic width. We need to make the tab bar constraints react to the actual update accessory view width.
Let me look at how we can reference the update accessory view from the TitlebarTabsTahoeTerminalWindow. The update accessory is created in TerminalWindow, and TitlebarTabsTahoeTerminalWindow inherits from TransparentTitlebarTerminalWindow. Let me check the inheritance chain.
Looking at the code:
- TitlebarTabsTahoeTerminalWindow inherits from TransparentTitlebarTerminalWindow
- TerminalWindow has the updateAccessory property
- We need to check if TransparentTitlebarTerminalWindow inherits from TerminalWindow
I should search for TransparentTitlebarTerminalWindow to understand the inheritance.
You're right. Let me check the inheritance chain and find a way to dynamically constrain based on the update accessory view's actual width.
Thread
Reference Thread
T-47dbc7c1-796a-45b4-ba21-3385cc89411a