Repository navigation
chore(dev-portal): show ClickHouse version, add expand/collapse all, improve pill contrast #3834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6254bee
30a83b7
7be3853
fc3c368
2950c34
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@hyperdx/app': patch | ||
| --- | ||
|
|
||
| feat: include each connection's ClickHouse server version in the "Copy debug info" report |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,9 @@ import { | |
| } from '@tabler/icons-react'; | ||
|
|
||
| import { IS_LOCAL_MODE } from '@/config'; | ||
| import { useConnections } from '@/connection'; | ||
| import { setHdxClickHouseVersions } from '@/hdxDebug'; | ||
| import { getMetadata } from '@/metadata'; | ||
| import { copyTextToClipboard } from '@/utils/clipboard'; | ||
|
|
||
| import { HelpSparkle } from './HelpSparkle'; | ||
|
|
@@ -197,6 +200,22 @@ export const AppNavUserMenu = ({ | |
|
|
||
| const AppNavVersionItem = ({ version }: { version?: string }) => { | ||
| const [copied, setCopied] = React.useState(false); | ||
| const { data: connections } = useConnections(); | ||
|
|
||
| // Fetched when the Help menu opens rather than on click: awaiting before the | ||
| // clipboard write would drop the user gesture Safari requires for it. | ||
| // getServerVersion is cached per connection, so this is usually free. | ||
| React.useEffect(() => { | ||
| if (!connections) return; | ||
| void Promise.all( | ||
| connections.map(async c => ({ | ||
| name: c.name, | ||
| version: ( | ||
| await getMetadata().getServerVersion({ connectionId: c.id }) | ||
| )?.join('.'), | ||
| })), | ||
| ).then(setHdxClickHouseVersions); | ||
| }, [connections]); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Debug copy can miss versionsLow Severity Copy debug info reads Additional Locations (1)Reviewed by Cursor Bugbot for commit 2950c34. Configure here. |
||
|
|
||
| return ( | ||
| <Menu.Item | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 P2 — ClickHouse versions only load once the Help menu has been opened, so
window.hdx.report()/copy()leave them out, and a fast first click can tooMove this effect into
AppNav.tsx, next to thesetHdxIdentityeffect (~line 224), which is always mounted. Right now it sits inAppNavVersionItem, which only mounts whileMenu.Dropdownis open. So the console API frominstallHdxDebug(packages/app/src/hdxDebug.ts) has noclickhouse:lines until the menu has been opened at least once. Also,Promise.allonly writes once the slowest connection answers, so clicking Copy right after opening the menu (cache still cold) gives a report with no ClickHouse lines at all. Write each connection's result as it arrives, or fetch on nav mount, so one slow connection doesn't hold back the others.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