Skip to content

Init demo GIF logging improvements #2461

In review

Description

@aklinker1

Noticed this in #2459, but consola is using it's basic formatter in the GIF... so it's logging [log] and [info] instead of no prefix and i, respectively.

https://github.com/wxt-dev/wxt/blob/e5ef936/docs/assets/init-demo.gif

This is probably because the GIF is generated by the github action, and consola sees it's a CI environment, so it doesn't use the pretty formatter, uses basic instead.

Not sure how to override this, but I'd prefer we use the pretty logger for the GIF

Activity

  1. added
    good first issue
    on Jul 1, 2026
  2. lntutor commented on Jul 26, 2026

    @lntutor
    Contributor

    I will take this. I will trace the workflow that records docs/assets/init-demo.gif, force consola's pretty formatter only for that recording command, regenerate the GIF, and verify the generated output has the intended compact prefixes. I will keep runtime logging behavior unchanged.

  3. aklinker1 commented on Jul 26, 2026

    @aklinker1
    MemberAuthor

    Looks like since prettier can't compute the number of columns of the terminal, it's putting the timestamp on the left? It looks arguably worse now lol

  4. changed the title [-]Init demo GIF not using consola's pretty formatter[/-] [+]Init demo GIF logging improvements[/+] on Jul 26, 2026
  5. thribhuvan003 commented on Aug 18, 2026

    @thribhuvan003
    Contributor

    it's not that it can't compute the columns. consola only right-aligns the timestamp at 80+, below that it falls back to [time] on the left:

    line =
      space > 0 && (opts.columns || 0) >= 80
        ? left + " ".repeat(space) + right
        : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;

    the tape currently lands at 62. vhs subtracts padding twice (default 60), plus ttyd's own 10px and the scrollbar, then divides by cell width (0.6 x font size, +1 for letter spacing): (1400 - 145) / 20.2 ≈ 62. that matches the current gif, where text starts at 65px in and each character is about 21px wide.

    three ways to clear 80, all landing at 81 columns:

    • Set Width 1800, keep FontSize 32, gif becomes 1800x800
    • Set FontSize 24, keep Width 1400, same dimensions but smaller text
    • Set Width 1600 + Set FontSize 28, gif becomes 1600x800

    padding alone won't do it, even Set Padding 0 at the current font only reaches 68. worth saying that fitting 80 columns in the frame means smaller text either way.

    happy to open a PR with whichever you'd prefer.

  6. suveshmoza commented on Nov 4, 2026

    @suveshmoza
    Collaborator

    6. Looks like since prettier can't compute the number of columns of the terminal, it's putting the timestamp on the left? It looks arguably worse now lol

    Adding consola.options.formatOptions.date = false; in packages/wxt/src/cli/index.ts avoids the timestamp

    Image
  7. PatrykKuniczak commented on Nov 27, 2026

    @PatrykKuniczak
    Collaborator

    @suveshmoza Are you able to open PR?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribution welcomegood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions