Feature/fsg gamma team ui fix #3

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