History is off the Cowork screen, not folded on it

I read "chevron gập pane Lịch sử — giữ" as "keep it as a strip" and left an 18px
sliver down the side. The drawing has nothing there: the body row is two columns,
transcript and files, and the relocation table settles it — History (lịch sử
chat), was "pane giữa, chỉ ở tab Cowork", now "Sidebar ▸ RECENTS", verdict "giữ,
dễ tới hơn". The line about the chevron belongs to a tally of the app's eleven
collapsible spots, not to this screen's layout.

So the panel is not on Cowork at all. "Tất cả project…" in RECENTS brings it in
at full width — it has to stay reachable, because search, filters, pin, rename
and multi-select delete exist nowhere else — and its chevron puts it away again.
Either choice survives leaving the screen and coming back.

check_cowork_screen now requires it absent on arrival and present after the
request; showing it unconditionally fails.

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 16:12:03 +09:00
co-authored by Claude Opus 5
parent b849cb6ea0
commit d434f7b095
2 changed files with 22 additions and 17 deletions
+5 -5
View File
@@ -91,13 +91,13 @@ def main() -> int:
# and its pane arrives folded to the strip the drawing keeps
w = win.workspace
sb = w._sidebar
print(f"vao Cowork: History gap={sb.is_collapsed()} rong={sb.width()}px")
if not sb.is_collapsed():
fails.append("pane Lich su mo san — man Cowork thanh 3 cot")
print(f"vao Cowork: History hien={sb.isVisible()}")
if sb.isVisible():
fails.append("pane Lich su van o tren man Cowork — ban ve chi co 2 cot")
w.show_history_pane()
app.processEvents()
print(f"sau 'Tat ca project…': History gap={sb.is_collapsed()} rong={sb.width()}px")
if sb.is_collapsed():
print(f"sau 'Tat ca project…': History hien={sb.isVisible()} rong={sb.width()}px")
if not sb.isVisible():
fails.append("'Tat ca project…' khong mo duoc pane Lich su")
w._on_history_fold(True)
app.processEvents()
+17 -12
View File
@@ -320,9 +320,13 @@ class WorkspaceTab(QWidget):
sb.history_changed.connect(self._reload_threads)
def _on_history_fold(self, collapsed: bool) -> None:
"""Remember what the user chose, so switching screens does not undo it."""
"""Its chevron closes the panel away, back to the drawn layout."""
self._history_opened = not collapsed
self._set_sidebar_collapsed(collapsed)
if collapsed:
self._sidebar.setVisible(False)
self._apply_pane_visibility()
else:
self._set_sidebar_collapsed(False)
def _set_sidebar_collapsed(self, collapsed: bool) -> None:
"""Collapse/expand History sidebar and redistribute splitter space so
@@ -411,15 +415,15 @@ class WorkspaceTab(QWidget):
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)
# The drawing gives Cowork two columns — the transcript and the
# files panel — and moves history to the rail's RECENTS. Its own
# "Vấn đề" note is that three panes squeezed the conversation below
# 60% of the width. So History arrives folded to its strip: the
# chevron the drawing keeps, one click from the full panel, and
# "Tất cả project…" in RECENTS opens it outright.
if on_cowork and not self._history_opened:
self._sidebar.set_collapsed(True)
# Cowork is two columns in the drawing — transcript and files — with
# no history pane and no strip where one used to be. The relocation
# table is explicit: History moves to Sidebar ▸ RECENTS, "giữ, dễ
# tới hơn". So the panel is not on this screen at all until asked
# for: "Tất cả project…" in RECENTS brings it in, since search,
# filters, pin, rename and multi-select delete live only there.
self._sidebar.setVisible(on_cowork and self._history_opened)
if on_cowork and self._history_opened:
self._sidebar.set_collapsed(False)
# QSplitter ignores hidden panes, but the freed width isn't handed to
# the remaining panes deterministically — set explicit sizes after any
# pane toggle (same lesson as _set_projects_collapsed).
@@ -714,8 +718,9 @@ class WorkspaceTab(QWidget):
live in this panel.
"""
self._history_opened = True
self._set_sidebar_collapsed(False)
self._show_cowork_tab()
self._sidebar.setVisible(True)
self._set_sidebar_collapsed(False)
def start_new_chat(self) -> None:
"""Start a new thread in the current project and show it.