Skip to content

Improve task runner summary #591

Description

@yyx990803

Right now the task runner summary takes up too much screen space:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    Vite+ Task Runner • Execution Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Statistics:   1 tasks • 0 cache hits • 1 cache misses
Performance:  0% cache hit rate

Task Details:
────────────────────────────────────────────────
  [1] tsdown-behavior#build: $ vp pack index.ts ✓
      → Cache miss: content of input 'vite.config.ts' changed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

If the user doesn't have the terminal at full window height (e.g. in an IDE terminal, or when the terminal is only taking up a small height at the bottom of the screen), this can easily fill up the entire vertical space, requiring scrolling up to see the original task output.

What we need to do:

  • If a single-task run has a cache miss, no need for summary at all.
  • For a single-task run with cache hit:
<original output>

---
[vp run] cache hit, 102.96ms saved.
  • For multi-task run:
<original output>

---
[vp run] 2/4 cache hit (50%), 1234ms saved. (Run `vp run --details` for full details)
  • Running vp run task --details displays the full info directly.
  • Running vp run --details displays the full info for the last run.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions