Skip to content

feature: diff #5

@MatrixManAtYrService

Description

@MatrixManAtYrService

I can imagine wanting to know whether two sessions captured by htty were "the same". Probably "same" here doesn't mean:

  • identical events with millisecond level precision (too strict)
  • the snapshots taken were the same (not strict enough)

Since ht makes it easy to get at the asciinema json for the session, I can add a flag that causes it to write that json to a file, and then I can add a subcommand which diffs these in a way that might be more tolerant of small time differences than diff would be.

I imagine using this in conjunction with #4. CI could do something like:

  1. Run tests
  2. diff new sessions with old sessions
  3. for each difference found, create an SVG that plays them side-by-side (or via 50% transparent overlay?)
  4. these animations could be placed in the pull request so that reviewers can see what is changed by this PR, if no animations are included they can conclude that the PR has no user-facing changes.
  5. it might also be nice to include these in the documentation as a sort of bridge between what we make assertions (in code) about, and what we make assertions (in docs) about.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions