Close the remaining gaps on Project and Cowork against the wireframes

Re-read both drawings element by element rather than by eye. Five things were
still wrong.

Cowork headed itself "Cowork" — the screen's own name, which the rail already
shows — where the drawing puts the THREAD's title. The title now follows the
conversation, falling back to the screen name for a chat that has none yet;
ChatPanel notifies on load, on reset and when a title is first derived from the
opening turn.

Its files panel read "Tệp đầu ra"; every section heading in the drawings is
caps, so it matches the rail and Monitoring now.

Project kept its three-line explanation above the panes on every visit. The
drawing heads a populated screen with the title alone and gives the text to the
EMPTY state instead, which is where it is actually needed — so it shows only
when there is no project yet.

The workspace path sat as grey caption text where the drawing shows a field. A
read-only line edit looks like one and lets the path be selected and copied.

And Lưu project sat directly under the folder row; the drawing floats it at the
foot of the panel, so a stretch went in above it.

Checked against the control inventory, not just the picture: "Nén" and "Thư mục
Local…" are marked giữ nguyên tại chỗ, so they stay in the status strip even
though the drawing's status line is text only.

New check_cowork_screen; check_project_screen gains the three points. Both
mutation-tested — pinning the title back to tr("cowork.title") and making the
hint unconditional each fail.

23/23 checkers pass. The Qt teardown segfault is still around: check_no_hscroll
took it 1 run in 3, after printing its verdict.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nam Pham Dinh Thanh
2026-08-18 15:38:46 +09:00
co-authored by Claude Opus 5
parent 300c10711e
commit 7d9a4e2378
5 changed files with 157 additions and 7 deletions
+12 -3
View File
@@ -274,8 +274,11 @@ class WorkspaceTab(QWidget):
self._folder_hdr = QLabel()
rl.addWidget(self._folder_hdr)
folder_row = QHBoxLayout()
self.folder_lbl = QLabel()
self.folder_lbl.setObjectName("hint")
# The drawing shows the path in a field, not as grey caption text. A
# read-only line edit looks like one and, unlike a label, lets the path
# be selected and copied.
self.folder_lbl = QLineEdit()
self.folder_lbl.setReadOnly(True)
self._browse_btn = QPushButton()
self._browse_btn.setIcon(icon("folder"))
self._browse_btn.clicked.connect(self._pick_folder)
@@ -287,6 +290,7 @@ class WorkspaceTab(QWidget):
folder_row.addWidget(self._open_btn)
rl.addLayout(folder_row)
rl.addStretch(1) # the drawing floats Lưu project at the bottom
save_row = QHBoxLayout()
self._save_btn = QPushButton()
self._save_btn.setIcon(icon("save"))
@@ -394,7 +398,9 @@ class WorkspaceTab(QWidget):
# space taken from Co4E's canvas and Folder's tree on every laptop
# screen. Shown where they apply; the text itself is unchanged.
self._header.setVisible(on_project)
self._hint.setVisible(on_project)
# ...and the explanation only while there is nothing to explain against:
# the drawing heads a populated screen with the title alone.
self._hint.setVisible(on_project and self.project_list.count() == 0)
narrow = getattr(self, "_is_narrow", False)
if self._sidebar is not None:
self._sidebar.setVisible(on_cowork)
@@ -546,6 +552,9 @@ class WorkspaceTab(QWidget):
row_to_select = i
self.project_list.blockSignals(False)
self.project_list.setCurrentRow(row_to_select)
# The drawing heads a populated screen with the title alone; the
# explanation is what an EMPTY one says instead of showing nothing.
self._hint.setVisible(self.project_list.count() == 0)
self._load_current()
@staticmethod