Skip to content

Commit a72e263

Browse files
committed
refactor: basculer vers la nouvelle CLI UI et supprimer l’ancienne interface
1 parent 5dc7d86 commit a72e263

26 files changed

Lines changed: 1044 additions & 3540 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ __pycache__/
99
# Swap/backup files
1010
*.swp
1111
*.bak
12-
12+
.codex
1313
# Distribution / packaging
1414
.Python
1515
build/

Core/IdeLikeGui/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"""Ide-like GUI wiring layer.
55
6-
This package only wires the new `ui_ide_design2.ui` to existing Core methods.
6+
This package only wires the new `Ui/Forms/ide_main_window.ui` to existing Core methods.
77
No business logic is implemented here.
88
"""
99

Core/IdeLikeGui/connections.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: Apache-2.0
22
# Copyright 2026 Ague Samuel Amen
33

4-
"""Connections for `ui/ui_ide_design2.ui`.
4+
"""Connections for `Ui/Forms/ide_main_window.ui`.
55
66
This module intentionally contains only UI loading, widget mapping and signal
77
connections to existing methods on the main GUI object.
@@ -77,14 +77,10 @@ def _prime_expected_attrs(self) -> None:
7777

7878
def _load_ide_like_ui(self) -> None:
7979
"""Load the new ide-like UI file and set it as central widget."""
80+
from Ui import ui_form_path
81+
8082
loader = QUiLoader()
81-
ui_path = os.path.join(
82-
os.path.dirname(os.path.abspath(__file__)),
83-
"..",
84-
"..",
85-
"ui",
86-
"ui_ide_design2.ui",
87-
)
83+
ui_path = ui_form_path("ide_main_window.ui")
8884
ui_file = QFile(os.path.abspath(ui_path))
8985
if not ui_file.open(QFile.ReadOnly):
9086
raise RuntimeError(f"Impossible d'ouvrir le fichier UI : {ui_path}")
@@ -93,7 +89,7 @@ def _load_ide_like_ui(self) -> None:
9389
if loaded is None:
9490
raise RuntimeError(f"Échec du chargement du fichier UI : {ui_path}")
9591

96-
# ui_ide_design2.ui uses QMainWindow as root. Reuse its central widget.
92+
# ide_main_window.ui uses QMainWindow as root. Reuse its central widget.
9793
if isinstance(loaded, QMainWindow):
9894
_clear_inline_styles(loaded)
9995
# Preserve status bar authored in the .ui file when available.

Core/UiConnection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ def _detect_system_color_scheme() -> str:
154154

155155
def _load_ui_file(self) -> None:
156156
"""Load the classic `.ui` file and install its central widget."""
157+
from Ui import ui_form_path
158+
157159
loader = QUiLoader()
158-
ui_path = os.path.join(
159-
os.path.dirname(os.path.abspath(__file__)), "..", "ui", "ui_design.ui"
160-
)
160+
ui_path = ui_form_path("classic_main_window.ui")
161161
ui_file = QFile(os.path.abspath(ui_path))
162162
if not ui_file.open(QFile.ReadOnly):
163163
raise RuntimeError(f"Impossible d'ouvrir le fichier UI : {ui_path}")

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ python -m OnlyMod.EngineOnlyMod --engine nuitka -f script.py --dry-run
199199

200200
## Project layout
201201

202-
- `cli/` — CLI entrypoints, headless operations, fallback mode, and dedicated shell.
202+
- `Ui/Cli/` — active ARK CLI entrypoints and command tree.
203+
- `cli/` — shared runtime and headless helper modules kept during the CLI migration.
203204
- `Core/` — main UI logic.
204205
- `Core/IdeLikeGui/` — wiring layer for the IDE-like main GUI.
205206
- `ENGINES/` — built-in engines.
@@ -208,9 +209,9 @@ python -m OnlyMod.EngineOnlyMod --engine nuitka -f script.py --dry-run
208209
- `Plugins_SDK/` — plugin SDK.
209210
- `bcasl/` — BCASL core.
210211
- `OnlyMod/` — standalone tools (BCASL and Engines).
211-
- `ui/` — Qt Designer UI.
212-
- `ui/ui_design.ui` — default main layout
213-
- `ui/ui_ide_design2.ui` — IDE-like layout
212+
- `Ui/Forms/` — Qt Designer UI forms.
213+
- `Ui/Forms/classic_main_window.ui` — default main layout
214+
- `Ui/Forms/ide_main_window.ui` — IDE-like layout
214215
- `languages/` — translations.
215216
- `themes/` — QSS themes.
216217

Ui/Cli/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Spec-first CLI implementation for ARK."""
2+
3+
from .app import build_cli, has_click
4+
from .entrypoint import main
5+
6+
__all__ = ["build_cli", "has_click", "main"]
7+

0 commit comments

Comments
 (0)