Skip to content

[HDX-5662] feat(app): always use the ClickStack brand - #3545

Merged
kodiakhq[bot] merged 6 commits into
mainfrom
elizabet/HDX-5662-clickstack-theme
Nov 5, 2026
Merged

kodiakhq[bot] merged 6 commits into
mainfrom
elizabet/HDX-5662-clickstack-theme

Conversation

@elizabetdev

Copy link
Copy Markdown
Member

Summary

The app always looks like ClickStack. Deployments and users can no longer pick a HyperDX brand, palette, or UI font. Light, dark, and system color mode stay in User preferences.

Name, page titles, and logos live in packages/app/src/brand/. A downstream build replaces that folder and keeps the same hook call sites. Colors stay in packages/app/src/theme/ and are not brand-specific. The app switcher is not part of this repo.

Screenshots or video

Screenshots were not captured in this session. Please add before (main) and after (this branch) of the nav logo and User preferences, same viewport and color mode.

Before After

How to reproduce

Starting point: Vercel preview for this PR, or yarn app:dev:local connected to the demo server.

On main:

  1. Open Search.
  2. Open the account menu and choose User preferences.
  3. Confirm a brand theme control and a font control are present, and the nav can show the HyperDX mark.

On this branch:

  1. Open Search.
  2. Confirm the nav shows the ClickStack wordmark and the tab title ends in ClickStack.
  3. Open the account menu and choose User preferences.
  4. Confirm Color mode, time format, time zone, row click, and content font size are still there, and there is no brand or font control.

How to test on Vercel preview

Preview routes: /search

Steps:

  1. Open /search.
  2. Confirm the navigation logo is the ClickStack wordmark.
  3. Open the account menu and choose User preferences.
  4. Confirm the dialog has Color mode and has no brand theme or font control.
  5. Switch Color mode between Light and Dark and confirm the page colors change.

References

Fixes HDX-5662.


Compound Engineering
Grok_4.7

Drop the HyperDX palette and the brand and font pickers so every deployment shares one look. Color mode stays a preference. Fixes HDX-5662.

Co-authored-by: Cursor <cursoragent@cursor.com>
@elizabetdev
elizabetdev requested a review from a team as a code owner November 4, 2026 12:12
@elizabetdev
elizabetdev requested a review from teeohhem November 4, 2026 12:12
@elizabetdev elizabetdev added the ai-generated AI-generated content; review carefully before merging. label Nov 4, 2026
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Nov 5, 2026 2:46pm UTC
hyperdx-storybook Ready Ready Preview Nov 5, 2026 2:46pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d333362

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Minor
@hyperdx/api Minor
@hyperdx/otel-collector Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the review/tier-4 Critical — deep review + domain expert sign-off label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🔴 Tier 4 — Critical

Touches authentication, tenancy data models, the public API or shipped database config — or substantially changes the query rendering engine, background tasks, the OTel pipeline, image build, or release CI.

Why this tier:

  • Large diff: 2262 production lines changed (threshold: 1000)
  • Cross-layer change: touches frontend (packages/app) + shared utils (packages/common-utils)

Review process: Deep review from a domain expert. Synchronous walkthrough may be required.
SLA: Schedule synchronous review within 2 business days.

Stats
  • Production files changed: 72
  • Production lines changed: 2262 (+ 729 in test files, excluded from tier calculation)
  • Branch: elizabet/HDX-5662-clickstack-theme
  • Author: elizabetdev

To override this classification, remove the review/tier-4 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 110 in total (1.22%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

* declaration handles both themes. */
.theme-clickstack input[role='switch'][data-checked='true'] + * {
* declaration handles both color modes. */
input[role='switch'][data-checked='true'] + * {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 minor — Switch on-label override loses to Mantine's :checked + .track rule now that the .theme-clickstack prefix is gone

The old selector .theme-clickstack input[role='switch'][data-checked='true'] + * had specificity (0,3,1), which beat Mantine's .input:checked + .track rule at (0,3,0). The new selector input[role='switch'][data-checked='true'] + * is only (0,2,1). Mantine's --switch-text-color: var(--mantine-color-white) therefore wins again, and the white on-label returns on the yellow accent in dark mode, which is the contrast failure the comment above describes. Restore the specificity, for example with html input[role='switch'][data-checked='true'] + * or :root input[role='switch'][data-checked='true'] + *, or by moving the override into Switch.extend in theme/mantineTheme.ts.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

/** Color mode preference (light/dark/system). Separate from brand theme (hyperdx/clickstack). */
/** Color mode preference (light/dark/system). */
colorMode: ColorModePreference;
font: 'IBM Plex Mono' | 'Roboto Mono' | 'Inter' | 'Roboto';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 minor — UserPreferences.font is now dead state that nothing reads

After this PR nothing reads userPreferences.font. _app.tsx hardcodes MANTINE_FONT_MAP.Inter, and the font picker in UserPreferencesModal is gone. The field and its default 'IBM Plex Mono' are still persisted to localStorage and asserted in __tests__/useUserPreferences.test.tsx. Remove font from the type and from DEFAULT_PREFERENCES, dropping it from stored values during migration so stale keys don't linger. Then update the tests.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

Comment thread packages/app/.storybook/preview.tsx Outdated
},
},
font: {
name: 'Font',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 minor — Storybook still has a UI font switcher for fonts the app can no longer render

The app now always uses Inter (_app.tsx passes MANTINE_FONT_MAP.Inter, and agent_docs/themes.md says the UI font is Inter). The Storybook font global still switches the Mantine fontFamily and --app-font-family to Roboto, IBM Plex Mono and so on, so stories can show configurations users never see. Remove the font toolbar and always pass Inter. That also leaves FONT_VAR_MAP and DEFAULT_FONT_VAR in config/fonts.ts with no callers, so they can be deleted too.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

PR Review

If you are a coding agent acting for the author, read this first.
Nothing below blocks merge automatically; a maintainer decides. What they will expect:

  • 🔴 critical or 🟠 major in code this PR adds or changes: fix before asking for review.
  • 🔵 minor in code this PR changes: your call. Fix if small, otherwise reply.
  • Anything about surrounding code, or asking you to widen the change (hoist a helper,
    dedupe with another file, fix other call sites): never fix here, whatever the
    severity. Reply with one sentence; if it is critical, say so plainly so a human sees it.

One commit per review round. After two rounds, stop and ask a maintainer to review
scope rather than addressing more automated findings. Full rule: AGENTS.md.

3 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 3 minor

3 posted as inline comment(s) on the changed lines.


Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Deep Review

✅ No critical issues found. This is a large but disciplined deletion/refactor (≈3,100 deletions, 413 insertions across ~100 files) that removes the two-brand theme system and always ships the ClickStack brand. The high-risk vectors for this kind of change were checked and are clean:

  • No dangling imports to the deleted modules (@/theme, theme/ThemeProvider, useAppTheme, AppThemeProvider, getTheme, isValidThemeName, DynamicFavicon) in app or test code.
  • Every @/brand consumer resolves against the new src/brand/index.tsx exports, and test mocks match the real export surface.
  • Favicon assets referenced in _document.tsx (public/favicons/clickstack/*, including favicon.ico) exist on disk.
  • The SCSS @use graph is intact after the theme-dir flattening (styles/app.scss → theme/_base-tokens.scss → theme/_tokens.scss → theme/_chart-categorical-tokens.scss).
  • NEXT_PUBLIC_THEME no longer has runtime references (only a historical CHANGELOG.md mention remains); the changeset is present with an appropriate minor bump.

The findings below are non-blocking.

🟡 P2 -- recommended

  • packages/app/src/brand/index.tsx:21 -- The page-title/brand logic (usePageTitle, BRAND_DISPLAY_NAME) moved here from the now-deleted theme/ThemeProvider.tsx/theme/index.ts, whose unit tests were removed, and every component test mocks @/brand, so the real title-composition ("Search - ClickStack" formatting) is no longer exercised by any test.
    • Fix: Add a focused unit test for usePageTitle covering the page-present and page-absent branches plus the INSTANCE_TITLE_SUFFIX concatenation.
🔵 P3 nitpicks (2)
  • packages/app/src/useUserPreferences.tsx:30 -- The font field remains in the UserPreferences type and is still persisted, but no code path applies it anymore (_app.tsx now hardcodes MANTINE_FONT_MAP.Inter), leaving a dead, user-unsettable preference.
    • Fix: Remove the font member (and its default) from UserPreferences, or add a comment documenting why it is intentionally retained for persisted-state compatibility.
  • packages/app/src/useUserPreferences.tsx:55 -- The default is font: 'IBM Plex Mono' while the app now always renders Inter, so the stored default is both dead and inconsistent with actual behavior.
    • Fix: Drop the default alongside the field, or align it to 'Inter' if the field is kept for compatibility.

Reviewers (8): ce-correctness-reviewer, ce-adversarial-reviewer, ce-maintainability-reviewer, ce-testing-reviewer, ce-kieran-typescript-reviewer, ce-project-standards-reviewer, ce-agent-native-reviewer, ce-learnings-researcher.

Testing gaps: No direct test for the new src/brand/usePageTitle composition after the theme-provider tests were deleted; UserPreferencesModal lost its brand/font controls with no assertion that they are absent.

No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 463 passed • 1 skipped • 1497s

Status Count
✅ Passed 463
❌ Failed 0
⚠️ Flaky 1
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

usePageTitle had no test once the theme provider tests were removed. The unused font preference stays so older saved preferences still parse.

Co-authored-by: Cursor <cursoragent@cursor.com>
@elizabetdev

Copy link
Copy Markdown
Member Author

Add a focused unit test for usePageTitle covering the page-present and page-absent branches plus the INSTANCE_TITLE_SUFFIX concatenation.

Addressed in packages/app/src/brand/__tests__/pageTitle.test.tsx. One case is ClickStack UK, the other is Search - ClickStack UK.

The font field remains in the UserPreferences type and is still persisted... Remove the font member (and its default), or add a comment documenting why it is intentionally retained.

Kept, and commented on the field. Older saved preferences include font, and dropping it would change what gets written back. The default stays IBM Plex Mono so a read does not rewrite storage. The UI always uses Inter and does not read the field.

elizabetdev and others added 2 commits November 4, 2026 13:19
The app no longer lets users pick a UI font, so stories should not either.

Co-authored-by: Cursor <cursoragent@cursor.com>
The collapse control used a left arrow. It now uses the sidebar glyph and flips when the nav is collapsed.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stylelint rejects the camelCase custom properties those tokens use.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the ClickStack brand while taking the saved-search name field and time zone shortcuts from main.

Co-authored-by: Cursor <cursoragent@cursor.com>
@elizabetdev

Copy link
Copy Markdown
Member Author

Add a focused unit test for usePageTitle covering the page-present and page-absent branches plus the INSTANCE_TITLE_SUFFIX concatenation.

Already covered in packages/app/src/brand/__tests__/pageTitle.test.tsx. It checks the page-absent title (ClickStack UK), the page-present title (Search - ClickStack UK), and the instance-label suffix. No further change.

The font preference notes in the same review are already documented on UserPreferences: the field stays so older saved preferences still parse, and the UI always uses Inter.

@kodiakhq
kodiakhq Bot merged commit af17e8f into main Nov 5, 2026
27 of 29 checks passed
@kodiakhq
kodiakhq Bot deleted the elizabet/HDX-5662-clickstack-theme branch November 5, 2026 15:12
kodiakhq Bot pushed a commit that referenced this pull request Nov 5, 2026
## Summary

The ClickStack brand migration still left a few user-facing strings hardcoded as ClickStack or HyperDX. A downstream build that replaces `src/brand/` does not change them. These now go through `useBrandDisplayName` or `usePageTitle`. Doc URLs are unchanged.

- ClickHouse-build banner: "{brand} features…" and the "{brand} docs" link
- `/careers` title, and "Join us to build {brand} at ClickHouse"
- Raw SQL chart help: "{brand} documentation"
- Search syntax reference tooltip: "{brand} search documentation"

Package names, the HyperDX browser SDK, Terraform provider copy, and comments are left as they are.

### Screenshots or video

Not captured in this session. The table is left for a visual check.

| Before | After |
| :----- | :---- |
| Hardcoded ClickStack / HyperDX | Brand display name |

### How to reproduce

**Starting point:** [play.hyperdx.io](https://play.hyperdx.io), or `yarn app:dev:local` connected to the demo server. The ClickHouse-build banner only shows when `IS_CLICKHOUSE_BUILD` is set.

**On `main`:**

1. Open `/careers`. The document title is "Careers | HyperDX" and the intro says "build ClickStack".
2. Open Search, then the help icon labeled "Open syntax reference". The external-link tooltip says "ClickStack search documentation".
3. Open Chart Explorer on a raw SQL chart and expand "SQL Chart Instructions". The link says "ClickStack documentation".
4. In a ClickHouse build, the top banner says "lacking core ClickStack features" and links "ClickStack Docs".

**On this branch:**

1. Repeat the same steps. Each of those names is the brand display name (ClickStack in this repo).

### How to test on Vercel preview

**Preview routes:** /careers, /search, /chart

**Steps:**

1. Open /careers and confirm the intro says the brand name rather than a hardcoded "ClickStack", and the tab title is "Careers - {brand}".
2. Open /search, click the search help icon ("Open syntax reference"), and hover the external-link icon. Confirm the tooltip uses the brand name.
3. Open /chart, switch to a raw SQL chart, expand "SQL Chart Instructions", and confirm the documentation link uses the brand name.

### References

- Related PRs: #3545
- Linear Issue:


Made with [Cursor](https://cursor.com)

This branch was successfully deployed

2 active deployments
Preview – hyperdx-oss — d3333623 Deployed Nov 5, 2026 by vercel[bot]
Preview – hyperdx-storybook — d3333623 Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated AI-generated content; review carefully before merging. automerge review/tier-4 Critical — deep review + domain expert sign-off

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants