Conversation
Greptile SummaryThis PR adds Google Analytics 4 (GA4) tracking to the aube docs site by inserting the standard
Confidence Score: 5/5Safe to merge — change is a well-formed, standard GA4 integration with no functional risk to the docs build. The snippet exactly matches the canonical GA4 pattern, measurement IDs are consistent across both script elements, the VitePress head tuple format is used correctly, and the change is scoped to a single config file with no logic impact. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant GTM as gtag.js CDN
participant GA as Google Analytics
Browser->>GTM: GET googletagmanager.com/gtag/js?id=G-WD1RRC0F8C (async)
GTM-->>Browser: gtag library
Browser->>Browser: execute inline init script
Browser->>GA: gtag('config', 'G-WD1RRC0F8C') → page_view event
GA-->>Browser: 200 OK (beacon)
Reviews (1): Last reviewed commit: "add google analytics tag" | Re-trigger Greptile |
## Summary - `ensure_installed` walked up to the nearest `package.json`, which in a monorepo subpackage stops at the subpackage. The install state file only exists at the workspace root, so every `aube run` / `exec` / `start` from a subpackage reported `install state not found` and spuriously re-ran install even when the root tree was fresh. - Prefer `find_workspace_root` as the freshness anchor, fall back to `find_project_root` for non-workspace projects, and finally to the cwd. - Added a regression test: `aube install` at the workspace root, then `aube start` from `packages/app` must not print `Auto-installing`. ## Why User report (bug #3): `aube start` in a workspace package re-ran install on every invocation after a root `aube install`. The freshness check was reading the wrong `node_modules/.aube-state` path. ## Test plan - [x] `cargo clippy --all-targets -- -D warnings` - [x] `cargo test --release -p aube` — 278 unit + 4 e2e pass - [x] `mise run test:bats test/run.bats` — 17 tests pass, including the new regression <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes the directory used to determine dependency freshness for auto-install, which can affect when installs run in monorepos vs single-package projects. Risk is limited by simple fallback logic and added end-to-end regression coverage. > > **Overview** > Fixes auto-install staleness checks in workspaces by anchoring `ensure_installed` at the *workspace root* (falling back to the nearest `package.json`, then the current directory) so subpackages reuse the root `.aube-state` instead of repeatedly reporting missing state and re-installing. > > Adds a Bats regression test that runs `aube install` at the workspace root and then `aube start` from `packages/app`, asserting it does **not** print `Auto-installing`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit edf9b04. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Skip empty bytes_segment so the phase-2 label doesn't render a
doubled `· ·` separator on installs without `dist.unpackedSize`
(Greptile P1).
* Switch ETA to fetch-window throughput: snapshot completed at the
set_phase("fetching") boundary, then divide remaining work by
`fetch_elapsed_ms / (completed - baseline)`. Falls back to `ETA …`
while the baseline or fetch window are missing. Eliminates the
pessimistic "110s ETA after a 3s resolve" case (Greptile P2).
* Reconcile estimated_bytes after filter_graph: track per-dep_path
unpacked_size during streaming, then re-sum surviving dep_paths
via the new InstallProgress::reconcile_estimated_bytes API.
Mirrors the package-denominator reconcile applied next to it
(Greptile P3).
* Apply TARBALL_COMPRESSION_RATIO in TTY refresh_bytes_segment too —
CI mode applied it; TTY was showing the raw unpacked sum (~3.3×
inflated) (Cursor #1).
* Refresh ETA on every inc_downloaded_bytes so it doesn't freeze
during long downloads when no inc_total / inc_reused events fire.
Documents the trade-off at FetchRow::drop where a refresh would
require a larger refactor (Cursor #3).
* Style only the ✓ green on the install / no-op summaries instead
of the whole sentence; aligns with the CI heartbeat summary's
styling so the success cue stays sharp without bleeding green
across the line (Cursor #4 + user request).
* Standardize the ✓ prefix on both Already-up-to-date paths
(`print_install_summary` and `print_already_up_to_date`).
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
headconfiguration.G-WD1RRC0F8Cso the docs site includes analytics on every page.Validation
npm run docs:buildNote: the docs worktree did not have
node_modules, so I installed the declared docs dependency withnpm install --no-save --no-package-lockto run the build, then removed generateddocs/node_modulesanddocs/.vitepress/distbefore committing.Note
Low Risk
Low risk: docs-only change that injects third-party analytics scripts; main risk is privacy/compliance and any unintended script loading impact on the docs site.
Overview
Adds Google Analytics tracking to the docs site by injecting the
gtag.jsloader and inlinegtag('config', 'G-WD1RRC0F8C')initialization into the shared VitePressheadconfig, enabling page-wide analytics on every docs page.Reviewed by Cursor Bugbot for commit 3584219. Bugbot is set up for automated code reviews on this repo. Configure here.