|
1 | | -## IDE-like Main GUI (`gui main --ide`) |
| 1 | +# IDE-like Main GUI (`gui main --ide`) |
2 | 2 |
|
3 | | -PyCompiler ARK can launch an alternative main interface layout inspired by IDE tools. |
4 | | -The preferred entrypoint is the grouped CLI form `gui main --ide`. |
| 3 | +This page documents the IDE-like variant of the ARK main GUI. |
5 | 4 |
|
6 | | -Use: |
| 5 | +## Launch |
| 6 | + |
| 7 | +Preferred command: |
7 | 8 |
|
8 | 9 | ```bash |
9 | 10 | python pycompiler_ark.py gui main --ide |
10 | | -# or |
| 11 | +``` |
| 12 | + |
| 13 | +Equivalent forms: |
| 14 | + |
| 15 | +```bash |
11 | 16 | python -m pycompiler_ark gui main --ide |
| 17 | +python -m pycompiler_ark --ide-gui |
12 | 18 | ``` |
13 | 19 |
|
14 | | -From the dedicated CLI: |
| 20 | +From dedicated CLI: |
15 | 21 |
|
16 | 22 | ```text |
17 | 23 | ark-cli> main --ide-gui |
18 | 24 | ``` |
19 | 25 |
|
20 | | -Legacy compatibility alias: |
| 26 | +## What This Mode Changes |
21 | 27 |
|
22 | | -```bash |
23 | | -python -m pycompiler_ark --ide-gui |
24 | | -``` |
| 28 | +- Loads the IDE-like UI layout (`ui/ui_ide_design2.ui`). |
| 29 | +- Keeps the same Core workflow as classic GUI: |
| 30 | + - workspace selection |
| 31 | + - compile/cancel flow |
| 32 | + - engine and plugin integration |
| 33 | + - entrypoint handling |
| 34 | +- Adds IDE-oriented affordances (activity area, overflow menu, dependencies quick access). |
| 35 | + |
| 36 | +## What This Mode Does Not Change |
| 37 | + |
| 38 | +- No separate business logic is introduced for compilation. |
| 39 | +- No dedicated engine/runtime pipeline is introduced. |
| 40 | +- CLI and CI/CD behavior remains unchanged. |
25 | 41 |
|
26 | | -## What It Changes |
| 42 | +## Architecture Notes |
27 | 43 |
|
28 | | -- Loads `ui/ui_ide_design2.ui` as the main window layout. |
29 | | -- Keeps existing Core logic (workspace, compilation, cancellation, etc.). |
30 | | -- Reuses the classic shared signal wiring and policies instead of duplicating them. |
31 | | -- Uses a wiring layer only (no duplicated business logic) through: |
32 | | - - `Core/IdeLikeGui/__init__.py` |
33 | | - - `Core/IdeLikeGui/connections.py` |
34 | | -- Keeps IDE-specific affordances: |
35 | | - - `...` activity-bar menu |
36 | | - - dependencies activity button |
37 | | -- Tunes the loaded layout at runtime to reduce label compression in the header, center panel, and logs area. |
| 44 | +IDE-like mode is a wiring layer on top of existing Core behavior: |
38 | 45 |
|
39 | | -## Runtime Switch |
| 46 | +- `Core/IdeLikeGui/__init__.py` |
| 47 | +- `Core/IdeLikeGui/connections.py` |
| 48 | +- `Core/Gui.py` (variant switch + fallback) |
40 | 49 |
|
41 | | -The launcher sets: |
| 50 | +Runtime variant switch: |
42 | 51 |
|
43 | 52 | ```text |
44 | 53 | PYCOMPILER_UI_VARIANT=ide2 |
45 | 54 | ``` |
46 | 55 |
|
47 | | -`Core/Gui.py` then selects `init_ide_like_ui()` and falls back to `init_ui()` if needed. |
48 | | - |
49 | | -## Current Scope |
50 | | - |
51 | | -The IDE-like wiring reuses the classic shared signal connector, then adds its |
52 | | -own IDE-specific actions on top. |
53 | | - |
54 | | -In practice, the IDE-like GUI inherits the classic main workflow instead of |
55 | | -exposing only a small subset of actions. |
| 56 | +If IDE-like UI cannot be loaded, ARK falls back to the classic GUI. |
56 | 57 |
|
57 | | -Notable points: |
| 58 | +## Maintenance Rule |
58 | 59 |
|
59 | | -- classic shared signal wiring is reused |
60 | | -- IDE-specific actions are connected afterward |
61 | | -- the entrypoint selector is initialized in IDE mode as well |
| 60 | +When GUI behavior changes: |
62 | 61 |
|
63 | | -For parity details and remaining checks, review the IDE/classic behavior in the current GUI implementation and tests. |
| 62 | +1. Keep parity with classic mode for shared features. |
| 63 | +2. Update this document if launch commands, scope, or fallback behavior changes. |
| 64 | +3. Keep CI/CD guidance in `docs/ci_cd_ark_cli.md` as source of truth for pipeline behavior. |
0 commit comments