fix(star-tracker): de-inflate chart-view counts + per-repo breakdown#62
Merged
Conversation
The chart preview rendered two <img> tags (light + dark) with CSS toggling visibility, so every page load fetched both variants and doubled the logged chart-view count. Switch to one <img> swapped by JS, and switch the landing-page auto-preview to <picture> so only the matching theme actually fetches. Also add a "Views by destination" breakdown in the Audience panel, grouping by (repo, kind) so the owner can see which org/repo pages and embedded charts are getting traffic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Owner viewing /:slug/:repo now sees an Audience panel scoped to just that repo's chart and page views. Uses the same viewsSummary helper with an optional repo filter. The "Views by destination" sub-section is suppressed when scoped (only one destination — the repo itself). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
wavekat-eason
pushed a commit
that referenced
this pull request
May 19, 2026
🤖 I have created a release *beep* *boop* --- ## [0.0.23](wavekat-com-v0.0.22...wavekat-com-v0.0.23) (2026-05-19) ### Features * **gha-runners:** dockerized self-hosted runner setup ([#65](#65)) ([120fd7e](120fd7e)) * self-hosted GHA runners on aoc-m3l + role-label workflow routing ([#64](#64)) ([d2d8415](d2d8415)) ### Bug Fixes * **gha-runners:** install gh CLI and Rust toolchain in docker image ([#66](#66)) ([9b167e7](9b167e7)) * **star-tracker:** de-inflate chart-view counts + per-repo breakdown ([#62](#62)) ([954f9d4](954f9d4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
<img class="light"> / <img class="dark">with CSS-driven theme toggling. Both fetched on every page render → analytics chart-view counts were ~2× inflated. Now one<img>with JS-swappedsrc. Toggle behavior preserved (still smooth, no flicker on existing radio change handler).<picture><source media="prefers-color-scheme: dark">…</picture>so the browser fetches only the matching theme.(repo, kind), so the owner can tell whether traffic is hitting the org-wide chart or a specific repo's chart/page.Notes
<img>means no-JS visitors no longer get the CSS-only theme toggle on the preview. Acceptable — the panel and toggles already require JS for split/style/range/embed-snippet refresh.Test plan
/wavekat, watch Network panel: one chart.svg request per render (vs two before).srcswaps, no second img exists, no double fetch./wavekat/chart.svgis fetched./wavekat/wavekat-vad, then check the owner Audience panel — the repo name shows up in "Views by destination" with its own chart/page counts.🤖 Generated with Claude Code