Repository navigation
feat(sessions): add shareable spend card (agentdiff --card) - #66
Closed
lostmartian wants to merge 2 commits into
Closed
lostmartian wants to merge 2 commits into
lostmartian wants to merge 2 commits into
Conversation
Write a self-contained HTML page that draws the user's spend on a canvas in the brand fonts and exports a PNG sized for X and LinkedIn (landscape or portrait, light/dark, optional hidden dollar amounts). The card holds only aggregate numbers and finding categories. No new dependencies.
Collaborator
Author
|
Closing: the shareable card isn't going into the product. Marketing assets live outside this repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
agentdiff --cardcreates an image of your spend that you can post:agentdiff-card.html(change with--card-out) and opens it in the browser (--no-opento skip).Share it: agentdiff --card ….Why
This is roadmap P1.3, built-in reach. The launch depends on people posting their own numbers, and an image is what gets shared on LinkedIn and X.
How
sessions/card.py:card_data()builds aggregate-only data: total, avoidable, a four-way breakdown, the top three leak categories, session and project counts, and the period;build_card_html()embeds that data as JSON, escaping</so it can't close the script tag. A test covers this.<canvas>, using Manrope and JetBrains Mono from Google Fonts with system-font fallbacks. It redraws once the fonts load and exports withcanvas.toBlob.Testing
Rendered from my real logs in a browser:
Checklist
make lintpassesuv run python -m pytestis greenCHANGELOG.mdentry added under[Unreleased](if feat/fix)type(scope): summary