Cowork: composer spans the screen, files panel keeps one heading

Read the wireframe as a tree this time instead of a flat list of its text, and
the difference was structural rather than cosmetic.

The drawing nests it: a toolbar row, then a body row holding the transcript and
the files column side by side, then the composer as its OWN full-width row under
both, then the status line. The app had the composer inside the chat column, so
it stopped at the files panel's edge — the input narrowed by ~220px the moment a
deliverable appeared. It is now a sibling of the splitter, spanning 1474 of 1490
px with the panel open.

The panel also carried two headings: a "Files" label, and under it the section's
own "TỆP ĐẦU RA (n)". The drawing has one — "TỆP ĐẦU RA (3) ›" — so the section
header moves onto that row with the collapse chevron at its right, and the label
steps out of the layout.

The check for that needed two attempts. Asking whether the "Files" label is
visible passes either way: unparented, it reports invisible whether or not the
code hides it. It now counts the headings the panel actually shows.

23/23 checkers pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nam Pham Dinh Thanh
2026-08-18 15:56:42 +09:00
co-authored by Claude Opus 5
parent 7d9a4e2378
commit 63b0af27e9
2 changed files with 59 additions and 6 deletions
+18 -6
View File
@@ -190,15 +190,20 @@ class ChatPanel(QWidget):
cc.addWidget(self.chat_view, 1)
self.thinking = ThinkingIndicator() # animated "working…" line while we wait
cc.addWidget(self.thinking)
self.center_split = QSplitter(Qt.Horizontal)
self.center_split.addWidget(chat_col)
root.addWidget(self.center_split, 1)
# The composer spans the whole screen, under BOTH columns — that is how
# the drawing lays it out, and it is the reason the files panel can sit
# beside the transcript without narrowing what you type into. Inside the
# chat column it stopped at the panel's edge and the input shrank
# whenever files appeared.
composer_wrap = QWidget()
cwl = QVBoxLayout(composer_wrap)
cwl.setContentsMargins(8, 4, 8, 8)
cwl.addWidget(self.composer)
cc.addWidget(composer_wrap)
self.center_split = QSplitter(Qt.Horizontal)
self.center_split.addWidget(chat_col)
root.addWidget(self.center_split, 1)
root.addWidget(composer_wrap)
# Right sidebar: Output files only (see below — Input is tracked but
# not shown).
@@ -243,8 +248,15 @@ class ChatPanel(QWidget):
self._io_collapse_btn.clicked.connect(lambda: self._set_io_collapsed(True))
self._files_header = QLabel()
self._files_header.setStyleSheet("font-weight:600;")
# The drawing gives this panel ONE heading — "TỆP ĐẦU RA (3) ›" — and
# the section already draws exactly that, count included. A separate
# "Files" label above it was the same thing said twice, so the section's
# own header moves onto this row and the collapse chevron sits at its
# right, where the drawing puts it. _files_header stays for the tabs
# that still label their panel, just not in this layout.
self._files_header.setVisible(False)
io_hdr.addWidget(self.output_section.header, 1)
io_hdr.addWidget(self._io_collapse_btn)
io_hdr.addWidget(self._files_header, 1)
# The plan now shows INLINE in the conversation (an expandable block whose
# steps tick off as they complete), not in this right panel — so it's kept
# out of the layout here. The object stays (its set_steps/clear calls are