anhtnm1andClaude Opus 5 5fb0f3a82d feat(ui): màn quản lý project — chế độ chỉ-xem, chặn trùng tên, menu chuột phải
Bốn thay đổi trên cùng một khối, gom vào presentation/workspace/project_editing.py:

- Project đã có mở ra ở dạng CHỈ ĐỌC; phải bấm "Sửa project" (nút vàng) mới gõ
  được, và nút Lưu chuyển xanh lá. Trước đây form luôn mở nên chỉ cần lỡ tay là
  sửa mất nội dung của một project đang dùng mà không có gì cảnh báo.
- Chặn TRÙNG TÊN khi tạo và khi lưu (không phân biệt hoa thường, bỏ khoảng
  trắng hai đầu). Danh sách bên trái chỉ hiện tên, nên trùng tên là không phân
  biệt được nữa. Chặn TRƯỚC khi ghi đĩa.
- Chuột phải một project: Mở / Sửa / Xoá. Trước đây bấm phải không làm gì cả.
- workspace.counts được format một lần lúc dựng dòng nên đổi ngôn ngữ xong nó
  vẫn nằm ở ngôn ngữ cũ, kể cả khi chọn tiếng Anh. ProjectRow giờ giữ SỐ và tự
  format lại — KHÔNG gọi refresh(), vì refresh() kết thúc bằng _load_current()
  và sẽ xoá mất nội dung người dùng đang gõ dở.

Ba nút về chung một hàng với "Project mới", và cùng theo một luật hiện/ẩn: chỉ
hiện trên sub-tab Project và khi có project đang mở. Hàng tiêu đề vắt ngang cả
màn Workspace nên thứ gì đặt lên đó cũng lọt sang Cowork/Co4E/Thư mục/GraphRAG
nếu không tự ẩn.

Màu vàng/xanh lá đi qua token warning/success. Hai nút dùng nền *_soft với chữ
và viền là token, KHÔNG phải nền đặc: hai token đó được chỉnh làm màu CHỮ (cùng
lý do accent và accent_solid là hai token riêng) — chữ trắng trên warning dark
#CCA700 chỉ đạt ~2.3:1, trượt AA.

ui/workspace_tab.py đang ở đúng trần bánh cóc nên phần mã mới bắt buộc ra module
riêng; chuyển _ProjectRow và CRUD sang đó làm file co từ 566 xuống 523 dòng mã,
và bánh cóc được siết theo.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 19:55:02 +09:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00
2026-08-31 05:15:13 +00:00

Cowork Local

Cowork Local is the internal AI cowork desktop platform. It provides a local-first desktop runtime, multi-turn conversational agents, workspace isolation, task scheduling, MCP connectors, security guardrails, and model routing.


🏛️ 4-Tier Clean Architecture

The codebase strictly adheres to Clean Architecture with unidirectional inward dependencies:

presentation/ (PySide6 UI, Shell, NavRail, Chat, Scheduling, Settings, Dashboard)
      │
      ▼
application/ (Pure Python Orchestration: Conversations, Scheduling, Workspaces, Monitoring, Routing)
      │
      ▼
domain/ (Pure Python: Entities, Immutable Execution Requests, Agent Events, Descriptors)
      ▲
      │
infrastructure/ (Adapters, LLM Providers, Atomic Persistence, Keyring SecretStore, MCP)
  • Domain & Application Layers: 100% Pure Python (zero Qt/UI imports).
  • Single Responsibility: Every production module is strictly <= 400 LOC.
  • Security & Durability: API keys stored in OS Keyring; atomic JSON disk persistence.

🚀 Quick Start

1. Windows — two double-clicks

install.bat      once, to install the Python dependencies
run.bat          every time, to start the app

install.bat builds an isolated virtualenv under %LOCALAPPDATA%\CoworkLocal (deliberately outside the repo — the quality gates walk the whole directory tree, so a .venv in here would turn every vendored module into a Gate O violation). Add --dev to also install the test dependencies, or --system to skip the virtualenv and install into the Python already on PATH.

Both scripts also make the source importable under its package name. That step is not optional: python -m cowork_local only resolves when the checkout directory is literally named cowork_local, and the MS365 MCP server is launched as a subprocess with python -m cowork_local.mcp_servers.ms365_server, so a differently-named checkout breaks the app and its subprocesses. The scripts create a junction instead of forcing anyone to rename their folder.

2. Any platform — run from source

From the parent of a checkout directory named cowork_local:

python -m cowork_local

3. Run Automated Tests

python -m pip install -r requirements.txt
pytest -q

There is one requirements file, not a runtime/test pair. A separate test file would hold only pytest: 64 of the 108 test modules build real widgets, and 20 of them import PySide6 unguarded at module scope, so it would have to pull in almost the whole runtime list anyway — two files for one near-identical list is just a second place for the pins to drift.


🛡️ CASAN Quality Gate & Verification

Before submitting any Pull Request, run the unified CASAN Quality Gate:

# Run all 4 quality gates (Clean Arch, Secrets, LOC, and Pytest Suite)
python scripts/run_quality_gate.py

# Run static and architectural guards only (fast check)
python scripts/run_quality_gate.py --skip-tests

Individual guard scripts:

  • Clean Architecture Import Guard: python scripts/check_imports.py
  • Secrets & Plaintext Audit: python scripts/audit_security.py
  • Single Responsibility LOC Guard: python scripts/check_loc.py --max-lines 400
  • Release E2E Smoke Test: pytest tests/e2e/test_smoke.py -v

🤝 Contributing & Recipes

S
Description
Cowork Local — internal AI cowork platform and shared foundation for FSG AI capabilities.
Readme
34 MiB
Languages
Python 97.8%
HTML 1.7%
Batchfile 0.4%