Đây là deliverable còn thiếu duy nhất trong 17 task của Gamma.
app.py 128 chỉ còn điểm vào chương trình
presentation/shell/
main_window.py 362 __init__ + vòng đời cửa sổ
nav_rail.py 385 dựng rail + cây điều hướng + thu gọn
top_bar.py 234 thanh trên + tài khoản + đáy rail
session_events.py 104 lịch sử, thông báo task xong
page_registry.py 82 4 màn chính, dựng lười, _goto
rail_project.py 132 bộ chọn project + RECENTS
lifecycle_coordinator.py 110 canh màn hình + tắt sạch
tray_manager.py 76 khay hệ thống
toast.py 40 thông báo góc trên trái
bootstrap.py 42 Composition Root
branding.py 26 ASSETS + app_icon
rail_metrics.py 37 kích thước rail + cách vẽ hàng
Mọi file dưới 400 dòng. Đây là ngưỡng CASAN Check 2.
NÓI THẲNG VỀ CÁCH TÁCH: sáu file trong đó là MIXIN, không phải widget rời.
Cả loạt phương thức đọc/ghi state của cửa sổ (self._page_widgets, self.workspace,
self.splitter...). Biến thành đối tượng cộng tác thì phải viết lại từng chỗ
self.X thành self.window.X — gần 800 dòng sửa chỉ để đổi cách gọi, rủi ro cao
mà không đổi hành vi. Mixin cho đúng thứ đang cần: mỗi mảng một file, ai sửa
rail thì mở file rail. Chuyển thành widget thật khi có cửa sổ thứ hai cần dùng
lại — hiện chưa có.
Giữ đường vào cũ: MainWindow, app_icon, _NAV_*, _Toast vẫn import được từ
cowork_local.app, nên 24 checker trong tools/ không phải sửa.
BA LỖI TỰ GÂY TRONG LÚC TÁCH, ĐỀU DO CHECKER BẮT
-------------------------------------------------
1. 12 import lazy nằm trong thân hàm bị thụt lề nên regex đổi mức tương đối
của tôi bỏ sót -> ModuleNotFoundError khi bấm vào rail.
2. Bộ dò import thiếu của tôi tính cả import cục bộ trong hàm KHÁC, nên tưởng
QHBoxLayout đã có -> 17 checker đỏ. Bỏ cách dò, cấp thẳng khối import đầy
đủ rồi cắt phần không dùng.
3. Hằng số ASSETS và _NAV_* nằm ở khối tôi không mang theo -> NameError.
Cả ba đều là lỗi im lặng với bộ test đơn vị (714 vẫn xanh suốt) và chỉ lộ khi
dựng cửa sổ thật. Đó chính là lý do bộ checker trong tools/ tồn tại.
Cập nhật 2 đích đột biến của check_probes_bite: mã nó cần sửa đã dời khỏi
app.py sang rail_project.py và nav_rail.py.
714 test xanh. 24/24 checker qua.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Cowork Local
Cowork Local is the internal AI cowork desktop platform owned by the Cowork Team. It provides the Cowork runtime, workspace and agent experiences, MCP/connectors, security controls, and model routing foundation.
The Cowork Team owns this product and its stable branch. The FSG AI Core Team contributes selected reusable capabilities through branches and Pull Requests; it is not the owner or final merger of this repository.
Quick start
The imported application is a Python/PySide6 package. Run it from the directory that contains cowork_local:
python -m cowork_local
The source snapshot does not include a complete runtime dependency manifest. Use the Cowork Team's supported runtime environment until that packaging contract is documented. The reliable automated test surface currently checked by CI is:
python -m pip install -r cowork_local/requirements-test.txt
python -m pytest cowork_local/tests -q
When already inside this repository, run python -m pytest tests -q.
Configuration and runtime data live under ~/.cowork_local/. Provider keys and local unlock codes must be supplied through environment variables or an approved secret manager; see .env.example.
Contributing
Start with START_CONTRIBUTING.md, then read CONTRIBUTING.md. Core AI task execution remains in fsg-ai-core-assets; source changes are reviewed as Pull Requests in this repository.
Security concerns should follow SECURITY.md. Ownership and completion rules are documented under docs/governance/.