Files
1ad92f0cbc feat: show the Headroom for Teams offer in the dashboard, docs, llms.txt and release notes (#3991)
## Description

This PR puts the Headroom for Teams offer (3 months of Enterprise free
with a 12-month plan) in the places people go after the README (#3990):
the dashboard, the docs site, `llms.txt` and the release notes. Each
link carries its own `utm_source`/`utm_medium`, so we can see which
surface converts.

No linked issue.

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- **Dashboard:** a slim, dismissible banner under the header. It shows
the user's savings when they are $1 or more. It is a plain link, so
nothing is fetched or reported.
- The banner is removed server-side on any **licensed** proxy, using the
running proxy's effective licence: `ProxyConfig.license_key`,
`HEADROOM_LICENSE`, or the deprecated `HEADROOM_LICENSE_KEY`.
`create_app` resolves the licence once and passes it to
`get_dashboard_html(licensed=...)`. This is a review fix: before, only
`HEADROOM_LICENSE` was checked.
- This only hides a promotion. OSS still needs no licence and checks
none; licences belong to the Enterprise plugins.
- **Docs site:** a dismissible top banner, a sidebar link and a new
`/docs/teams` page.
- The page's Open source vs Enterprise table now states what OSS already
ships (tool search on Anthropic requests; opt-in, rule-based model
routing) and what Enterprise adds. This is a review fix.
- **`llms.txt`:** a Headroom for Teams section, with the same accuracy
fix.
- **Release notes:** a `release.yml` step appends one footer line under
the changelog. It is keyed on its own marker, `<!--
headroom-teams-footer -->`, rather than on the perks link, so a
changelog entry that mentions the link no longer suppresses the footer.
This is a review fix.
- **Telemetry opt-out:** `llms.txt` and `docs/content/docs/proxy.mdx`
named a `--offline` flag that does not exist. The switch is
`HEADROOM_OFFLINE=1`.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ pytest -q tests/test_dashboard_teams_perk.py tests/test_dashboard_static_assets.py
============================= 17 passed in 18.40s ==============================
# test_dashboard_teams_perk.py: renderer, with and without each licence env var and with an explicit flag;
# /dashboard route, unlicensed, with ProxyConfig.license_key, with HEADROOM_LICENSE, with HEADROOM_LICENSE_KEY

$ pytest -q tests -k "dashboard or release or license"
4 failed, 305 passed, 1 skipped
# the 4 failures are tests/test_dashboard/test_live_feed.py (Playwright browser tests). They fail identically
# on this branch without the review commit; it is this machine's browser setup.

$ ruff check headroom/dashboard/__init__.py headroom/proxy/server.py tests/test_dashboard_teams_perk.py
All checks passed!
$ mypy headroom/dashboard/__init__.py --ignore-missing-imports
Success: no issues found in 1 source file

# release footer step, simulated twice on notes that already link the perks page:
appended
skipped        # re-run is a no-op; footer present exactly once
```

## Real Behavior Proof

- Environment: macOS 26.6 (arm64), Python 3.12.13, FastAPI `TestClient`
against `create_app`.
- Exact command / steps: `pytest -q tests/test_dashboard_teams_perk.py`.
The release step's shell was run twice against a notes file that already
mentions `headroom-perks.vercel.app`.
- Observed result: the `/dashboard` route serves the banner unlicensed,
and strips it for each of the three licence sources while leaving the
rest of the page intact. The footer is appended once and is not
duplicated on a re-run.
- Not tested: the release step against a real GitHub release (it runs on
the next release), and the docs `next build` after this commit (only
Markdown/MDX text changed).

## Runtime Rollout Safety

- Rollout-managed feature(s): none.
- Minimum rollout channel: stable.
- Stable/default behavior changed: yes. Unlicensed dashboards show a
dismissible banner, and the docs site shows a dismissible banner.
- Kill switch / disable path: set any licence token to hide the
dashboard banner. It is a plain link, with no network calls.
- Unsafe override required: no.
- Qualification impact: none.
- Rollback path: revert this PR.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A

## Additional Notes

- **Review fixes are in `eeb0008a`:** @JerrettDavis's two points (the
effective licence source, and the OSS routing row) and Devin's
footer-marker and `--offline` findings.
- **Not changed:** Devin's suggestion to show sub-dollar savings. The $1
floor is deliberate, because "you saved $0.40" weakens the offer, and
the cost card still shows the exact amount.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-10-07 10:59:41 -05:00
..