feat(workflow): dry-run preview — resolve tokens and show the step plan without executing hooks
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python, yaml
- Lĩnh vực
- api, backend, documentation, frontend
Hướng nghiên cứu
Start with src/profiles/core/environment/workflow.py and read _substitute_variables to understand the existing token resolution, then check the workflow exports in src/profiles/core/__init__.py. The proposal also involves the preview route in src/profiles/server/routes/workflow.py, WorkflowRunnerModal.tsx, and both hooks guides. Done means a resolved, read-only preview reports condition outcomes without executing hooks; the issue names no tests to run.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Authoring workflow hooks today means editing the .profiles YAML, saving, launching a real file, and watching the commands actually run. Every iteration has side effects: files get moved/archived, commands execute, launches happen. A user tweaking a phase: post archive step, or checking whether {{file}}/{{output}} resolve as expected in an ask: prompt, has no way to see the resolved plan without performing the launch. This makes hook authoring the highest-friction part of the workflow feature — debugging requires real files and real executions.
Evidence
- Token substitution is a private helper with no resolve-only entry point on the core surface:
_substitute_variablesatsrc/profiles/core/environment/workflow.py:660.src/profiles/core/__init__.pyexportsrun_hooks_for_file/parse_hook_entriesbut nothing that renders a step without executing it. - Server workflow routes are execution-only:
start/get/respond/abort(src/profiles/server/routes/workflow.py:397-643). No preview/dry-run route. - The web runner (
src/profiles/web/src/components/WorkflowRunnerModal.tsx) can only show steps as they actually execute. docs/hooks-guide.en.md/hooks-guide.fr.mddocument the token grammar but offer no way to check a substitution result before a real launch.
Proposed approach
- Core (pure, UI-free): a
preview_workflow(steps, context) -> list[PreviewedStep]function inprofiles.core.environment.workflownext to_substitute_variables, reusing the same substitution logic (including the quote-aware command path).{{output}}renders as a labelled placeholder since nothing executes;if:conditions are evaluated and reported as true/false/skip. Export fromprofiles.core. - Server:
POST /api/workflow/previewtaking a file path, with an optional inlinestepsoverride so the YAML config editor (issue #95) can preview a draft before saving it. - Web: a read-only "Preview" view — either a tab in
WorkflowRunnerModalor a standalone modal listing each step with phase, resolved command/message, and condition outcome. No run button. - Docs: hooks-guide (en + fr) section.
- Scope M. No breaking change — pure addition.
Alternatives considered
- Cancel before the first command in a real run — still spawns processes, races the user, and can't preview an unsaved draft; doesn't help authoring.
- CLI-only
profiles --preview-hooks <file>— useful but misses the web-first audience; the core function proposed above can back a CLI flag later at near-zero cost.
Proposed during automated enhancement scan 2026-11-04
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 1
- Merge trung bình
- 4 giờ 46 phút
- Pull request đã merge (30 ngày)
- 55
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của falbany/ProFiles
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
falbany/ProFiles#187 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Web UI: config handoff from a second launch leaves the open YAML editor showing stale contentĐang mởbug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của falbany/ProFiles
Issue tương tự
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
aws-samples/sample-spec-driven-presentation-maker#648 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
firestore: enable live window.yaml pipeline system tests once add_window_fields is in productionĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
googleapis/google-cloud-python#19115 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
CRS WKT default to WKT2Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày