From 60545654d6b407e4ac6aa2aa17b70a9f80aac7b4 Mon Sep 17 00:00:00 2001 From: Nam Pham Dinh Thanh Date: Tue, 18 Aug 2026 16:16:57 +0900 Subject: [PATCH] =?UTF-8?q?+=20Project=20m=E1=BB=9Bi=20belongs=20to=20Proj?= =?UTF-8?q?ect,=20not=20to=20every=20workspace=20screen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moving it onto the title row put it on the wrong side of a boundary: that row lives on WorkspaceTab, above the sub-tabs, so it is drawn over Cowork, Co4E, Folder and GraphRAG too — a button offering to create a project in the corner of a chat. The title label beside it already followed the sub-tab; the button did not, because I added it to the row without adding it to that rule. Both follow it now. check_project_screen walks the other four sub-tabs and fails if the button shows on any of them. 23/23 checkers pass. Co-Authored-By: Claude Opus 5 (1M context) --- tools/check_project_screen.py | 15 +++++++++++++++ ui/workspace_tab.py | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/tools/check_project_screen.py b/tools/check_project_screen.py index 098dcd0..8d441e1 100644 --- a/tools/check_project_screen.py +++ b/tools/check_project_screen.py @@ -143,6 +143,21 @@ def main() -> int: fails.append(f"picker khong hien ten {name!r}") break + # 9. the title row sits above the sub-tabs, so what is on it must follow + # the title — + Project mới turned up in the corner of every other one. + for idx, name in ((w._cowork_tab_idx, "Cowork"), (w._co4e_tab_idx, "Co4E"), + (w._folder_tab_idx, "Thu muc"), + (w._graphrag_tab_idx, "GraphRAG")): + if idx < 0: + continue + win._goto(win._ROW_WORKSPACE, idx) + app.processEvents() + if w._new_btn.isVisible(): + fails.append(f"nut '+ Project moi' hien ca o man {name}") + win._goto(win._ROW_WORKSPACE, w._project_tab_idx) + app.processEvents() + print(f"nut tao chi hien o Project: {not any('Project moi' in f for f in fails)}") + print() for f in fails: print("FAIL " + f) diff --git a/ui/workspace_tab.py b/ui/workspace_tab.py index bf0b208..533e760 100644 --- a/ui/workspace_tab.py +++ b/ui/workspace_tab.py @@ -410,6 +410,10 @@ 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) + # The title row sits above the sub-tabs, so everything on it has to + # follow the same rule the title does — moving + Project mới up here put + # it in the corner of Cowork, Co4E, Folder and GraphRAG as well. + self._new_btn.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)