HDX-2078
This PR shifts the creation of the ClickHouse client used by alerts to the AlertProvider interface, to support other auth methods in other AlertProvider implementations.
Running locally, the default provider creates the client and successfully queries with it:
<img width="1716" height="206" alt="Screenshot 2025-09-18 at 3 58 31 PM" src="https://github.com/user-attachments/assets/971a633f-6ddd-42ca-be70-19e303573938" />
Closes HDX-2281
This PR adds two additional functions to the `AlertProvider` interface, and implements them for the default provider. The intention behind these changes is to eliminate all direct Mongo access from the alert check loop, and instead handle the connection to Mongo through the `AlertProvider` interface.
The new functions are as follows:
1. `getWebhooks(teamId): Map<string, IWebhook>`: This function is used to retrieve the webhooks that may be used to send alerts. While it would be nice to just attach the webhook information to the AlertDetails, we have (unfinished?) support for referencing arbitrary wehbooks within message templates, and this pattern better supports that future use-case without having to process message templates while loading alerts.
3. `updateAlertState(AlertHistory)`: This function is used to update the state of an Alert document and save the given AlertHistory document.
The AlertDetails and AlertTask interfaces have also been updated to reduce the number of parameters passed to some functions while still shifting Mongo accesses to the AlertProvider:
1. AlertDetails now includes the `previous` AlertHistory value
2. AlertTask now includes the value of `now`
Across the app, we are inconsistent with when we can open the sidebar and expand functionality. This is because the sidebar and logic was managed by the parent component.
Additionally, the expand logic was set to assume a certain structure that some places in the application could not support (ex clickhouse dashboard doesn't have a 'source').
As a result, I have created the `DBSqlRowTableWithSideBar` component which will manage a lot of the common use cases for us. This PR introduces that new component, and updates all references (that could be easily upgraded) to use the new component when applciable.
The result: a lot less duplicate code (see # of lines removed) and the ability to more easily maintain the components down the road.
This PR also fixes several bugs I found as I tested these flows, especially around sidebars opening subpanels.
Fixes: HDX-2341
it could fail locally depending on if the .d.ts files in common-utils were generated, since common-utils uses aliases and tsup can't generate these aliases, we turn off skipLibCheck ([which is recommended](https://www.typescriptlang.org/tsconfig/#skipLibCheck)) and those files are not type checked, those ignoring the alias issue but still type checking the code)
**Note**: This setting is already enabled in `app`, so we are just syncing it to `api` and `common-utils`
original ticket: https://github.com/hyperdxio/hyperdx/pull/1159
Closes HDX-2407
This PR fixes searches which sort in ascending time order or do not order based on time. With this change, time-based "chunking" of queries (#1125) will only be used when the results are ordered by time. Further, when ordering by time _ascending_, the chunks will load in ascending time order (rather than descending time order).
Fixes: HDX-2296
When a user clicks the ">" icon, the row is expanded and live tail is paused.
<img width="1882" height="451" alt="image" src="https://github.com/user-attachments/assets/4b4f12e0-df80-49b0-b917-455b213b4f3a" />
The user is able to interact with with the inline view as well
<img width="1823" height="334" alt="image" src="https://github.com/user-attachments/assets/e0c1acfc-7523-470d-b385-343c6e84ad9f" />
The user can click the expand button in the top right to open the sidebar
<img width="258" height="180" alt="image" src="https://github.com/user-attachments/assets/40b40c59-29a8-44fc-a310-6b55121029b4" />
The tab last chosen by the user persists in local storage
Clicking on an item in the table results in the sidebar opening as it does today.
These changes also:
* Disable the chevron in places where the sidebar is not hooked up today
* Disables interactivity of Event Tags if it doesn't have the proper events passed into it as well.
Bumps [next](https://github.com/vercel/next.js) from 14.2.30 to 14.2.32.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vercel/next.js/releases">next's releases</a>.</em></p>
<blockquote>
<h2>v14.2.32</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong> include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>fix router handling when setting a location response header <a href="https://redirect.github.com/vercel/next.js/issues/82588">#82588</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a href="https://github.com/ztanner"><code>@ztanner</code></a> for helping!</p>
<h2>v14.2.31</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong> include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>fix(next/image): improve and simplify detect-content-type (<a href="https://redirect.github.com/vercel/next.js/issues/82179">#82179</a>)</li>
<li>fix(next/image): fix image-optimizer.ts headers (<a href="https://redirect.github.com/vercel/next.js/issues/82178">#82178</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a href="https://github.com/styfle"><code>@styfle</code></a> and <a href="https://github.com/ztanner"><code>@ztanner</code></a> for helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="89ee561552"><code>89ee561</code></a> v14.2.32</li>
<li><a href="6a974adc45"><code>6a974ad</code></a> [backport v14]: fix router handling when setting a location response header (...</li>
<li><a href="55f76620ff"><code>55f7662</code></a> v14.2.31</li>
<li><a href="5dd68a5853"><code>5dd68a5</code></a> [backport v14]: fix(next/image): improve and simplify detect-content-type (<a href="https://redirect.github.com/vercel/next.js/issues/8">#8</a>...</li>
<li><a href="bcc7c65c5a"><code>bcc7c65</code></a> [backport v14]: fix(next/image): fix image-optimizer.ts headers (<a href="https://redirect.github.com/vercel/next.js/issues/82114">#82114</a>) (<a href="https://redirect.github.com/vercel/next.js/issues/82">#82</a>...</li>
<li>See full diff in <a href="https://github.com/vercel/next.js/compare/v14.2.30...v14.2.32">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/hyperdxio/hyperdx/network/alerts).
</details>
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.5 to 6.6.1.
<details>
<summary>Commits</summary>
<ul>
<li><a href="9b77436a59"><code>9b77436</code></a> 6.6.1</li>
<li><a href="04cb6f54ce"><code>04cb6f5</code></a> Merge commit from fork</li>
<li><a href="b8a7edd61a"><code>b8a7edd</code></a> 6.6.0</li>
<li><a href="34c853478c"><code>34c8534</code></a> fix: signature verification due to leading zeros</li>
<li><a href="3e46a48fdd"><code>3e46a48</code></a> 6.5.7</li>
<li><a href="accb61e9c1"><code>accb61e</code></a> lib: DER signature decoding correction</li>
<li><a href="03e06e135c"><code>03e06e1</code></a> 6.5.6</li>
<li><a href="7ac5360118"><code>7ac5360</code></a> Merge commit from fork</li>
<li>See full diff in <a href="https://github.com/indutny/elliptic/compare/v6.5.5...v6.6.1">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/hyperdxio/hyperdx/network/alerts).
</details>
This PR fixes: HDX-1641
The Linear issue only mentions:
> The Run button on the Markdown form doesn't do anything
However, in **Charts Explorer → Markdown**, the time picker also wasn’t working. I’ve removed it as well.
<img width="2681" height="2048" alt="image" src="https://github.com/user-attachments/assets/6f6b7fc5-544f-43e2-ab9d-05894f83e8d6" />
When using a trace table with the default otel schema of `ServiceName, SpanName, toDateTime(Timestamp)`, we currently return a blank order by which breaks sorting in search page.
Instead, if we fail to optimize the order by based on the primary key, we should just return a default value instead of an empty value.