Skip to content

feat!: improve cli architecture#342

Draft
Cyber-Syntax wants to merge 13 commits into
mainfrom
feat/improve-cli-design
Draft

feat!: improve cli architecture#342
Cyber-Syntax wants to merge 13 commits into
mainfrom
feat/improve-cli-design

Conversation

@Cyber-Syntax

Copy link
Copy Markdown
Owner

Closes #325

Introduce a SubProgressType enum and a PROCESSING ProgressType, and
propagate sub_type throughout the UI progress system. TaskConfig,
TaskInfo and TaskState now include an optional sub_type. ProgressReporter
.add_task gained a sub_type parameter and ProgressDisplay/Ascii backend
use sub_type to render more specific operation labels. Also replace old
operation name mappings with OPERATION_NAMES / SUB_PROCESSING_NAMES and
adjust protocol re-exports (protocols.**getattr** lazy-exports).

BREAKING CHANGE: ProgressReporter.add_task signature changed (new
sub_type arg); TaskConfig/TaskInfo/TaskState include sub_type; callers
should update any direct usages (including generate_namespaced_id which
now accepts sub_type). Update imports where progress types moved. Run
ruff, mypy and tests after making call-site updates.
Introduce TRANSACTION_SUMMARY_HEADER in progress_types and use it
in install and update summary logging instead of ad-hoc literal lines.
Enhance ASCII progress renderer to append a total downloads summary
line that displays total size, average speed, ETA, progress bar and
completed count.
Add a helper to format the right-aligned metrics section and use the
detected terminal width (with a safe 80-column fallback) to pad the name
so size/speed/ETA/bar/percentage align to the right. Use "--" for
unknown size/speed and "--:--" for unknown ETA. Simplify size/speed
formatting and apply the same right-alignment logic to the total line.
Delegate moving-average calculation to calculate_speed (pure helper)
and apply the returned updated history back onto task_info.speed_history
(intentional mutation). Clarify docstring and preserve fallback to the
last recorded speed when insufficient data is available.
Update tests to expect the new summary header
":: Creating transaction summary..." instead of
"Installation Summary:" / "Update Summary:". Adjust progress-related
assertions to validate size units, progress bar brackets and percentage
(100%) rather than relying solely on a checkmark. Remove obsolete tests
that asserted the previous checkmark-only behavior.
@github-project-automation github-project-automation Bot moved this to Ready in my-unicorn Jun 3, 2026
@Cyber-Syntax Cyber-Syntax moved this from Ready to In progress in my-unicorn Jun 20, 2026
BREAKING CHANGE:
- All of the api now need to use the new error types from the
  exceptions.py and all the error related stuff going to be kept under
  that module.
- progress_types.py module is now only related with transaction status etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

🛠️ pacman style cli design

1 participant