Compare commits

..

30 Commits

Author SHA1 Message Date
Vinícius Lourenço
0fcaae2a8f chore(web): drop duplicate uPlot stylesheet import from anomaly view 2026-11-27 10:17:38 -03:00
Vinícius Lourenço
05cf64aa34 chore(web): drop past-tense note from uPlot stylesheet comment 2026-11-27 09:17:36 -03:00
Vinícius Lourenço
ca10a4806e perf(web): serve the uPlot stylesheet as a hashed asset 2026-11-26 15:43:02 -03:00
Aditya Singh
b1f271a505 fix(frontend): show the full text of truncated labels in one tooltip (#13735)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description

- Since #13087, `Typography` opens its own tooltip when its text is cut
off. Four places also had an outer tooltip, so hovering cut-off text
showed it twice.
- Quick filter section titles showed the title twice in one stacked
tooltip. Span event attribute keys and values, and query builder search
suggestions, opened two separate popups.
- This PR removes the outer tooltip at those four places. Cut-off text
now shows its full text once, and text that fits shows no tooltip.
- Suggestion value and operator rows did not shrink, so their text was
never cut and only the outer tooltip showed a long value. The row's left
section now shrinks, so a long value ends in "…" and its tooltip opens.
- New stories hover cut-off text in quick filters, span events and the
pipeline filter suggestions, and they fail on `main`. Two jest tests for
the old quick filter tooltip are removed, because jsdom cannot measure
text.

#### Issues closed by this PR

Part of https://github.com/SigNoz/events-pod/issues/306

#### Screenshots / Screen Recordings

Screenshots of the new stories, in dark and light themes:
https://claude.ai/artifact/Lcjn1xBj8qTM9yesjPDmK6

- Quick filters: before and after. On `main` the title shows twice in
one tooltip.
- Span events and the pipeline filter suggestions: after only. Their
plays use a helper this PR adds, so `main` cannot run them.

#### Additional Information

- A long span event value inside the hover popover still opens the
popover and the `Typography` tooltip together. That fix needs a change
in `@signozhq/ui`.
2026-11-26 15:42:49 +00:00
Vinicius Lourenço
c92bb94caf perf(web): load each metrics, meter and messaging queues tab when it opens (#13696)
#### Description

Metrics explorer, Meter and Messaging queues import all of their tabs up
front. Each tab now loads when it opens, using the per-tab loading state
from #13691. Tab URLs and order stay as they are. Infrastructure
monitoring and API monitoring are left alone: their tabs share almost
all of their code, or there is only one.

Opening each page's default tab, entry included: Metrics goes from 11.43
MB to 11.09 MB, Meter from 11.39 MB to 11.14 MB and Messaging queues
from 11.26 MB to 10.96 MB.

The queue details drawer on the messaging queues overview relied on
styles the Celery tab happened to load; it now imports them itself.

Part of #10192

#### Screenshots / Screen Recordings

Switching metrics explorer tabs in Storybook, main on the left, with the
network slowed to 1.6 Mbps so the loading state is visible:


https://github.com/user-attachments/assets/5802c696-680e-4afc-93d7-a59536542af9

Queue details drawer, main on the left:

![Queue details
drawer](https://github.com/user-attachments/assets/b6d0f13d-f7cc-4e0e-b2de-3c7f6af1e5f4)

The 40 metrics, meter and messaging queues stories render the same in
both themes, except the Celery state drawer table, which sits 1px
higher.
2026-11-26 14:44:51 +00:00
ashu8912
8e3a4f8775 fix(list-filter): run a filter tag's removal when its dropdown is closed (#13753)
#### Description

- Removing a Created-by tag with its × only staged the change: the query
runs when the dropdown closes, and the × never opens it. The chip
vanished but the list kept its old results.
- `MultiSelectFilter` now commits any change made with its dropdown
closed (a tag's ×, the clear icon) through `onCommit`; picks in an open
dropdown still stage until it closes.
- Dashboards' Created-by, the service accounts status filter (same bug)
and the alert rules status filter (which had its own copy of this) all
use it.

#### Issues closed by this PR

Closes SigNoz/pulse-pod#789

#### Screenshots / Screen Recordings

[Visual diff](https://claude.ai/artifact/LGAnLu31NHXY5eZ6PLz3Yx)
(sbshot, merge-base vs this branch, dark and light): removing the
Created-by tag on My dashboards and the Deleted status tag on service
accounts now reruns the list. 14 of 22 pairs are pixel-identical; the
other 4 are timestamp and anti-aliasing noise.

#### Additional Information

- The clear icon clicked while the dropdown is open now stages like any
other pick, running on close.
2026-11-26 14:01:25 +00:00
Vinicius Lourenço
a8433ad9e0 perf(web): use CSS variables instead of the design-tokens Style object (#13685)
#### Description

`Style` from `@signozhq/design-tokens` is an object of 817 `var(--...)`
strings, and the bundler keeps all of it once anything imports it. The
side nav did, for one value, so the whole object sat in the entry chunk.
The three values the app used are now written as the CSS variables they
already held, and oxlint rejects importing `Style`. The entry chunk
loses 47.6 kB (7.8 kB gzipped). Colors render the same, since the
strings are identical.

Part of #10192

#### Screenshots / Screen Recordings

Main on the left or top, this branch on the right or below:

![Settings menu in the side
nav](https://github.com/user-attachments/assets/ab0236ba-f10d-48e7-87aa-5612ea4a3dfb)

![OIDC form with claim
mapping](https://github.com/user-attachments/assets/80d7a7b6-1c0c-442b-bd6a-68ce4853573f)

The 46 stories that render these icons are pixel-identical in both
themes, apart from a focus ring left on one form input.
2026-11-26 12:47:49 +00:00
Vinicius Lourenço
d07b0f1d82 perf(integrations): import antd from its ES entry instead of antd/lib (#13683)
#### Description

The cloud integrations page imported `Modal`, `Form`, `Select` and
`Skeleton` from `antd/lib`. That path is antd's CommonJS entry, so it
pulled every antd component into the page's chunk. Importing from `antd`
takes that chunk from 1.30 MB to 108 kB (335 kB to 26 kB gzipped).

It also fixes how the remove-account modal looks. `antd/lib` is a second
copy of antd that the app's `ConfigProvider` does not reach, so that
modal used antd's default theme (larger text, bold title, rounder
buttons). It now picks up the app theme.

#10491 removed these imports once and they came back, so oxlint now
rejects runtime imports from `antd/lib`. Type-only imports stay allowed.

To check, run `pnpm build` on main and on this branch and compare
`build/assets/IntegrationsDetailsPage-*.js`.

Part of #10192

#### Screenshots / Screen Recordings

The remove-account modal, main on the left and this branch on the right:

![Remove account modal, light
theme](https://github.com/user-attachments/assets/c67a3d7b-f7b3-4631-a667-a820f4147b76)

![Remove account modal, dark
theme](https://github.com/user-attachments/assets/37dbf93b-f6f0-41f7-b5a6-d7e28e76b376)

Across the 43 cloud account stories in both themes, the only other
differences are toasts caught mid-fade.
2026-11-26 12:29:45 +00:00
Vinicius Lourenço
a02330438f perf(dashboard): emit logo assets as files instead of inlining them (#13684)
#### Description

Dashboard JSON can point at any logo under `src/assets/Logos`, so the
icon map globs all 240 of them. The glob used `?url`, but Vite still
inlines every file under `assetsInlineLimit` as base64, so the logos
shipped inside the JS whether a dashboard used them or not. With
`?no-inline` they are emitted as files and fetched only when a dashboard
shows one. The chunk that holds the icon map goes from 376 kB to 76 kB
(135 kB to 23 kB gzipped).

To check, on a production build (`pnpm build && pnpm preview`) import a
dashboard whose `image` is `/assets/Logos/redis`: the logo loads as its
own `redis-<hash>.svg` request.

Part of #10192

#### Screenshots / Screen Recordings

Dashboard list with logo images, main on top and this branch below:

![Dashboard list with
logos](https://github.com/user-attachments/assets/783b8889-629b-4e86-9990-5712015e709e)

The logo stories are pixel-identical in both themes. Across the 102
dashboard list, detail and settings stories, the other differences are
toast fades and mock timestamps a second apart.
2026-11-26 12:28:12 +00:00
Ashwin Bhatkal
cb2b3db771 chore(page-story): guard plays on the args their story sets (#13768)
#### Description

- Plays the page-story skill writes now check the args their own story
sets. A story that sets `view: 'mine'` to put a Created-by tag on screen
must still pass when someone flips the view in the panel. This is the
miss from
https://github.com/SigNoz/signoz/pull/13753#discussion_r4706154296.
- The skill now says to go through every control a story exposes, the
page's own as well as the shared ones, before writing a play's early
returns.
- New PR rule: a review fix to a file with the AI-owned banner also adds
the lesson to the skill or agent that made it, so the next run doesn't
write the same bug again.

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/786
2026-11-26 12:25:02 +00:00
Ashwin Bhatkal
40ee169d94 fix(query-builder): keep value suggestions open when the editor re-renders (#13760)
#### Description

- The query search value dropdown now stays open when the editor
re-renders. Before, every render handed CodeMirror new extensions. When
the cursor sat on an empty value like `service.name = '`, that closed
the dropdown, for example when key suggestions loaded late.
- The CodeMirror extensions, `onChange` handler and `basicSetup` are now
built once. They read the latest suggestions and run handler through
refs, as `ListFilter/SearchBar` does.
- This fixes the flaky `fetches value suggestions when editing value
context` test. The "keeps the value suggestions open when the key
suggestions load" test now waits past CodeMirror's re-query, so it fails
without this fix. Its old assertion ran before the dropdown closed.
- Stories already cover this: the Traces and Metrics explorer plays type
`service.name = ` and wait for a value suggestion.

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/782
2026-11-26 12:05:03 +00:00
hardik-signoz
865e1c97b3 feat(authz): expose ingestion-key and ingestion-limit fga (#13648)
#### Description

- Gates the Ingestion keys page on the new `ingestion-key` and
`ingestion-limit` permissions, so users without them can't trigger
actions that would be rejected.
- Moves limit create/update/delete off the deprecated gateway routes to
`/ingestion_limits`; their permissions are identical.
- Shows both resources in the roles editor.
- Ingestion shows in the settings sidebar for every role. The legacy vs
multi-key page split is unchanged (multi-key when the gateway is on,
legacy for cloud otherwise); only the admin/editor condition is dropped.

#### Issues closed by this PR

Closes SigNoz/keystone-pod#42

#### Screenshots / Screen Recordings

[sbshot diff](https://claude.ai/artifact/FutBFmcA9ERz1GzcrhjYJN) vs the
merge-base, dark and light:
- Ingestion: unchanged for permitted users (30 pairs identical), plus 9
new Authz stories.
- Roles: only the new Ingestion Keys and Limits panels and the viewer's
sidebar link changed.

#### Additional Information

- Open on the ticket: the new `/ingestion_limits` calls are not yet
tested against a real gateway.

---------

Co-authored-by: vikrantgupta25 <vikrant@signoz.io>
2026-11-26 12:03:33 +00:00
ashu8912
5f24193de6 fix(list-views): match the view name placeholder to its list (#13767)
#### Description

- The save/rename view dialog hardcoded "e.g. Prod alerts", so the
dashboards list showed an alerts example.
- `ViewsRail` now takes `viewNamePlaceholder`; alerts keep "e.g. Prod
alerts", dashboards use "e.g. Prod dashboards".
- The dashboards list story already opens this dialog in its play, so no
story change.

Found while testing SigNoz/pulse-pod#775.
2026-11-26 11:58:17 +00:00
Ashwin Bhatkal
3d63ed6353 ci(goci): bump setup-go to v7 to reuse main's module cache (#13744)
#### Description

- `goci` jobs now use the same `setup-go` as the primus jobs (v7.0.0,
pinned), so they restore the Go module cache that `build-staging` saves
on `main`.
- setup-go v5 keys its cache on `go.sum` and v7 keys it on `go.mod`.
`main` only ever gets the v7 key, so `build`, `openapi`, `authz`,
`web-settings`, `transaction-groups` and `semconv-generated` missed it
and downloaded every module from proxy.golang.org on each run.
- Those downloads failed 11 runs since Nov 23 with `stream error: ...
INTERNAL_ERROR; received from peer`, 4 of them in the merge queue. `go`
does not retry a reset download.
- To check: on this PR's run, the `go-install` step of `build` should
log `Cache restored from key: setup-go-...-e68ddbf...`.

<details>
<summary>Failed runs</summary>

- Nov 23 16:36 UTC, PR:
[transaction-groups](https://github.com/SigNoz/signoz/actions/runs/45218336614/job/137845455490)
- Nov 24 14:43 UTC, PR:
[openapi](https://github.com/SigNoz/signoz/actions/runs/45417214716/job/138526593113)
- Nov 24 15:45 UTC, merge queue:
[build](https://github.com/SigNoz/signoz/actions/runs/45429166803/job/138569346003)
- Nov 24 17:03 UTC, merge queue:
[build](https://github.com/SigNoz/signoz/actions/runs/45444178593/job/138623258070)
- Nov 24 17:10 UTC, PR:
[web-settings](https://github.com/SigNoz/signoz/actions/runs/45445506450/job/138628048194)
- Nov 24 17:58 UTC, PR:
[transaction-groups](https://github.com/SigNoz/signoz/actions/runs/45454318875/job/138659559545)
- Nov 24 17:59 UTC, PR:
[web-settings](https://github.com/SigNoz/signoz/actions/runs/45454538375/job/138660328195)
- Nov 24 18:09 UTC, PR:
[openapi](https://github.com/SigNoz/signoz/actions/runs/45456425417/job/138666985974),
[build](https://github.com/SigNoz/signoz/actions/runs/45456425417/job/138666985982)
- Nov 24 18:39 UTC, merge queue:
[authz](https://github.com/SigNoz/signoz/actions/runs/45461964073/job/138686679525),
[build](https://github.com/SigNoz/signoz/actions/runs/45461964073/job/138686679898)
- Nov 24 18:41 UTC, PR:
[build](https://github.com/SigNoz/signoz/actions/runs/45462168844/job/138687411123),
[transaction-groups](https://github.com/SigNoz/signoz/actions/runs/45462168844/job/138687412071)
- Nov 24 19:12 UTC, merge queue:
[build](https://github.com/SigNoz/signoz/actions/runs/45467713142/job/138706955705)

</details>

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/776
2026-11-26 11:34:07 +00:00
hardik-signoz
3af06adabc feat(authz): auth-domains and organization fga (#13706)
#### Description

- Include auth domains and the organization in the generated frontend
permissions, so the role editor offers them.
- Show Organization Settings, and the SSO section in it, to all roles.
Access is decided by authz instead of the legacy admin-only check.
- Gate the auth domain list and delete, and the organization display
name, on their permissions. Saving a domain stays a backend check.
- Add unit tests, SSO stories and E2E specs.

#### Issues closed by this PR

Closes SigNoz/keystone-pod#39

#### Screenshots / Screen Recordings

[Before and after Storybook shots of the settings
pages](https://claude.ai/artifact/1Az85vbiW1RU1rk5JD5zRN), dark and
light. Role editor and role details list the new Auth Domains and
Organization panels. The Display name field and its Submit button use
the `@signozhq/ui` components. The baseline is the merge-base plus a
commit that only retitles the Single Sign-on stories, so old and new
stories pair.
2026-11-26 10:20:43 +00:00
ashu8912
7b20abbeb7 fix(unauthorized): align the contact link with the message text (#13758)
#### Description

- The "reach out to us." link on the anonymous Access Restricted page
sat below the text baseline and had no space before it.
- `Button` is an `inline-flex` box with a fixed 24px link height,
centring its label; letting its height size to content and aligning on
the baseline puts it on the line. Set via `--button-*` tokens since
`Button` drops `className`.
- The leading space moves outside the button, where flex layout no
longer swallows it.

#### Screenshots / Screen Recordings

Visual diff (sbshot, `Pages/System/Unauthorized`, dark + light, baseline
`main`): https://claude.ai/artifact/AxR71cviVejCEE96XhbEHM
2026-11-26 09:25:37 +00:00
Vinicius Lourenço
73e6fa555a fix(infra-monitoring): restore log navigation from the entity drawer (#13742)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description

Log details opened from an infra monitoring drawer works again: the
arrow keys step through the logs, and a click on another log row opens
that log. Both broke when the entity drawer moved to `@signozhq/ui`,
which blocked keys and clicks on the drawer below log details.
`0.4.1-rc.1` fixes it (SigNoz/components#532).

A new e2e test in the infra monitoring drawer spec covers both, and the
Pods story "Details Drawer Log Navigation" covers the arrow keys.

#### Screenshots

After:


https://github.com/user-attachments/assets/548292f3-41e7-4d8b-b1f5-40872a2f8fb2

#### Additional Information

`0.4.1-rc.1` is a prerelease because SigNoz/components#532 is still
open. I'll bump to the stable release once it merges.
2026-11-26 08:24:09 +00:00
Gaurav Tewari
91525d721e feat(noz): show open chats as bottom-strip tabs (#13602)
<!--A few plain bullets saying what changed and why, for a reviewer
skimming it - not a wall of text, not a restatement of the diff, not
generated boilerplate.-->
#### Description

Stacked on #13601.

- Open Noz conversations show as tabs in the bottom strip, newest beside
Ask Noz. Clicking one opens it in the Noz panel; × closes the tab
without archiving the thread.
- A tab whose reply the user hasn't seen shows a dot, and a placeholder
chime plays when a reply lands off screen. A reply on screen is read at
once.
- Tabs and unseen replies persist in localStorage, so they survive a
reload, a closed tab or a restart. Tabs are capped at 5; past that, the
oldest tab goes.
- Saved ids are pruned only after a successful thread fetch, so a failed
fetch can't wipe them. A deleted, archived or another user's thread
drops out on the next good fetch.
- `StripTab` / `StripTabs` are generic strip components (no Noz imports)
beside `StripTypography` and `StripKeyValue`.
- When the strip runs short, the tabs shrink first and their titles
truncate; Ask Noz, history and Support keep their size, and the tabs
never cover the left slot.
- Chat tabs also show on the Noz page, where a tab opens its chat in the
page.
- The Noz page's conversation list marks a chat with an unseen reply
with the same blue dot.
- The panel header gains a minimize button, which hides the panel and
keeps the chat as a tab. × now also closes the chat's tab; a reply
landing later brings it back.
- A tab also shows the dot while Noz waits on the user's approval or
answer there, and a chat that starts waiting joins the strip. Ask Noz
loses its pulsing dot: it always starts a new chat, so it can't lead to
the waiting one.

<!--Reference issues using `Closes #issue-number` to enable automatic
closure on merge. -->
#### Issues closed by this PR


https://github.com/orgs/SigNoz/projects/59/views/18?pane=issue&itemId=306515634&issue=SigNoz%7Cnerve-pod%7C643

<!--If applicable, include screenshots or screen recordings that clearly
show the behavior before the change and the result after the change. -->
#### Screenshots / Screen Recordings


https://github.com/user-attachments/assets/99192505-8df2-4108-896d-3872e1926fe2



<!--Anything reviewers should keep in mind while reviewing -->
#### Additional Information

- Tab state lives with Noz, not the strip:
`useAIAssistantOpenConversationsStore` in `AIAssistant/store` and
`useAIAssistantActiveChats` (which also plays the chime) in
`AIAssistant/hooks`. `BottomStrip/NozActiveChat` only renders the tabs,
so the panel doesn't import from the strip.
- The store tracks loading per thread (`loadingThreadIds` replaces the
global `isLoadingThread`), so switching tabs while another chat loads
works, and a chat's skeleton and disabled input follow only its own
load.
- Stories: Components/Strip Tabs (Default, Crowded, Focused) and
Foundations/Bottom Strip `NozChats` / `NozChatOpen`. The global Noz
mocks gain "Open chats" and "Unseen replies" controls (default 0, so
other stories are unchanged). `NozAwaitingYou` now shows the waiting dot
on a tab.
- Bottom Strip `NozChatOpen` checks each chat opens on its end.
Pages/Noz with Open chats and Unseen replies set shows the list dot. The
Noz page mock now answers each thread as itself.
- Ports the earlier work from #13573 onto the Noz stack.

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-11-26 07:00:30 +00:00
Gaurav Tewari
251d49efce feat(noz): open recent conversations from the bottom strip (#13601)
<!--A few plain bullets saying what changed and why, for a reviewer
skimming it - not a wall of text, not a restatement of the diff, not
generated boilerplate.-->
#### Description

Stacked on #13598.

- A history icon in the bottom strip, next to Ask Noz, opens a popover
of recent conversations with a title search. Picking one opens it in the
Noz panel.
- It stays while the panel is open, and hides when Noz is off, on the
Noz full page (whose sidebar lists the chats), or with no saved
conversation.
- It reads the list the shell already loads on every page, so it adds no
request.
- The floating panel and the Cmd/Ctrl+J popup chat lose their history
toggle. The conversation list is now full-page only, so its panel layout
is gone.
- Ask Noz always starts a new chat (reusing an empty open one) and stays
in the strip while the panel is open, so the panel and the popup chat
drop their + button.
- Opening the history closes the panel behind it, so one Noz surface
shows at a time.
- The list's open state lives in the Noz store (`isHistoryOpen`), like
the panel's, so a keyboard shortcut can open it later. It isn't
persisted.
- Both history lists open a chat through `useOpenConversation`, which
always reloads it, so a chat whose load failed can be retried.
- Like the panel, the popover moves left of the support chat while it's
open and back once it closes; Support no longer dismisses it. No new
obstacle system: `FloatingPanel`'s existing obstacle types and utils
move to `lib/obstacles` (renamed, not rewritten), and
`useAvoidObstacles` now subscribes through a shared `watchObstacles`.
The only new pieces are `getRightClearance` and `usePopoverAvoidance`,
the popover's counterpart to `useAvoidObstacles`.
- The @ picker's row style and the conversation list's relative time are
shared with the popover.
- Popover rows use the full-page list's text: vanilla-400 titles in dark
mode (`--l2-foreground` in light, since vanilla-400 doesn't follow the
theme), 20px line height and plain digits.

<!--Reference issues using `Closes #issue-number` to enable automatic
closure on merge. -->
#### Issues closed by this PR


https://github.com/orgs/SigNoz/projects/59/views/18?pane=issue&itemId=306515634&issue=SigNoz%7Cnerve-pod%7C643

<!--If applicable, include screenshots or screen recordings that clearly
show the behavior before the change and the result after the change. -->
#### Screenshots / Screen Recordings

Visual diff (sbshot, both themes, vs `main`):
https://claude.ai/artifact/8xwuRCyTKntdDsfktVKjLP

- 98 pairs change: History and + leave the modal and panel headers, and
the strip gains the History icon. 2 are new (the History popover), 16
are removed (the header History stories), 62 are identical.



https://github.com/user-attachments/assets/ebf88e0b-0096-40e1-b605-b1df9bd7bc94


https://github.com/user-attachments/assets/6772ab32-44b2-48bd-812f-231525860bbb




<!--Anything reviewers should keep in mind while reviewing -->
#### Additional Information

-  We should merge this with the next follow up

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-11-26 06:27:11 +00:00
Vinicius Lourenço
7d92c443b3 refactor(web): move the changelog modal to the signozhq dialog (#13692)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description

The changelog modal now uses the `@signozhq/ui` dialog instead of the
antd `Modal`, with the dialog's own colors and spacing. The title row,
scrollable content, footer actions and the "Scroll for more" button
stay, and the surface is one flat panel instead of boxes inside a box.
"Scroll for more" is now a primary `@signozhq/ui` button, so Tab shows
the same focus ring on it as on the footer buttons.

On main the modal's background depended on CSS load order: its own rule
and the global `.ant-modal .ant-modal-content` rule from #10742 have the
same specificity, so whichever loaded last won. The dialog drops those
antd overrides. It also no longer sits under the other `@signozhq/ui`
dialogs, and cloud workspaces, which have no upgrade actions, no longer
get an empty footer bar.

Stacked on #13689.

#### Screenshots / Screen Recordings

![Changelog
dialog](https://github.com/user-attachments/assets/02d6a5af-229c-4ff0-b5f8-b3d196bb092b)

Self-hosted workspace in the dark theme, main on the left and this
branch on the right.
2026-11-26 01:21:47 +00:00
Vinicius Lourenço
11cc323ca5 perf(web): load the AI assistant and changelog only when they render (#13689)
#### Description

The app layout imported the AI assistant panel and modal and the
changelog modal up front, so every page downloaded them before it could
render, including for users who never see the assistant. The assistant
brings the dashboard panel registry and the query builder along, and
with them uPlot, chart.js, CodeMirror, `moment-timezone` and
react-markdown. The assistant's code now loads only when it renders for
the user, and the changelog when it opens. If one of those chunks is
gone after a deploy, the page reloads once, the same way lazy pages
recover.

The entry chunk goes from 10.94 MB to 6.67 MB (2.94 MB to 1.81 MB
gzipped). On a 10 Mbps connection with a 4x slower CPU, the login form
shows in 3.7 s instead of 5.3 s.

Part of #10192

#### Screenshots / Screen Recordings

Cold load of the login page, main on the left. The stats include a build
with every bundle PR merged, for where this is heading:


https://github.com/user-attachments/assets/934ec550-4431-4d54-be51-dc952409565e

![First load
stats](https://github.com/user-attachments/assets/1f10ec42-bea4-48cc-afcb-89a8186f0733)

The changelog modal, main on the left. It now shows "Scroll for more"
when the notes overflow; on main the modal measured before its content
had laid out:

![Changelog
modal](https://github.com/user-attachments/assets/5ca17f48-24fe-4d21-be07-d8d995af6fc5)

The other app layout and bottom strip stories are pixel-identical in
both themes.
2026-11-26 00:26:26 +00:00
Vinicius Lourenço
2d5a07048a fix(widget-card): never request the previous widget query when the card is enabled (#13722)
#### Description

A panel whose widget query changed fetched once more with the previous
query before the new one.

The card kept a copy of the query in state and refreshed it in an
effect, one render late. On the service overview this is the latency
chart: it waits for the top level operations, then sends `name in []`,
which `query_range` rejects with a 400.

The card now sends the widget query directly, and list panels keep only
their paging in the request state.

The logs list stored its page size in that copy, so a query change reset
the request to the widget's page size while the picker kept showing the
user's. It now lives in the paging params and survives a query change.

> The list of logs does not appear to be used by these legacy pages, so
it is likely that this code path is not executed.

This fails `services/detail.spec.ts` TC-04 and `services/list.spec.ts`
TC-02 on #13689, whose timing hits the race on every run.
`GridCardGraph.test.tsx` covers both stale-query cases and the page
size; all three fail without the change.

#### Screenshots

Before:

<img width="894" height="157" alt="image"
src="https://github.com/user-attachments/assets/71a50d88-c49f-4ace-9510-0d40355ec7d0"
/>

After:

<img width="893" height="132" alt="image"
src="https://github.com/user-attachments/assets/2a618cfd-6796-40f9-99a5-aca2436f5fcb"
/>

> No failed requests
2026-11-25 23:52:50 +00:00
Abhi kumar
6921b40467 fix(dashboard): paint the page background in full screen (#13752)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
## Description

- In full screen the dashboard container had no background, so the
browser's black full-screen backdrop showed through in light mode,
hiding the dark section titles.
- The container now paints `--l1-background`, the same surface as the
app shell, in both themes.

Before: 


<img width="3024" height="1964" alt="Screenshot 2026-11-25 at 9 39
43 PM"
src="https://github.com/user-attachments/assets/0f1cf438-a3b7-4323-b532-335fcb0440f6"
/>

After: 

<img width="2056" height="1329" alt="image"
src="https://github.com/user-attachments/assets/9ed6e1dc-9b9f-4ebe-bbad-80494944fd1d"
/>
2026-11-25 17:25:19 +00:00
Vinicius Lourenço
d655a8998b perf(web): load Monaco on the first editor mount (#13686)
#### Description

Since #12515, `src/index.tsx` imports Monaco, so every page loads the
whole editor before it renders. Monaco and our setup (workers, themes,
`loader.config`) now load on the first editor mount. The entry chunk
goes from 10.94 MB to 7.19 MB (2.95 MB to 2.00 MB gzipped).

The hook sits on `@monaco-editor/react`'s loader, not on a wrapper
component, so every editor, including ones added later, gets the bundled
Monaco without changing its import. #12697 takes the wrapper route, and
the editors added or moved since it opened bypass it and can fall back
to the CDN.

Storybook's preview imported the setup directly, so it now imports the
loader as well.

#### Issues closed by this PR

Closes #12692

#### Screenshots / Screen Recordings

ClickHouse query editor, main on top and this branch below:

![ClickHouse query
editor](https://github.com/user-attachments/assets/16f807de-6c51-47f1-85a3-5d3cade864aa)

The 31 editor stories render the same in both themes. The differences
left are the role JSON view race that #13671 fixes and Monaco's overview
ruler drawn a moment later.
2026-11-25 15:42:47 +00:00
Vinicius Lourenço
70ab9c2321 perf(web): load each logs, traces and LLM observability tab when it opens (#13695)
#### Description

Logs, Traces and LLM Observability import all of their tabs up front, so
opening the logs explorer also downloads pipelines, and the traces
explorer downloads funnels. Each tab now loads when it opens, using the
per-tab loading state from #13691. Tab URLs and order stay as they are.

Opening each page's default tab, entry included: LLM Observability goes
from 12.45 MB to 11.80 MB, Logs from 11.63 MB to 11.50 MB and Traces
from 11.75 MB to 11.62 MB. The smaller tabs gain more: funnels drops to
10.97 MB. With the entry PRs in, the page shell alone is 2.55 MB.

Part of #10192

#### Screenshots / Screen Recordings

Switching from the traces explorer to funnels in Storybook, main on the
left, with the network slowed to 1.6 Mbps so the loading state is
visible:


https://github.com/user-attachments/assets/a910cbe8-2db8-431e-95a1-586ba6e0e50d

The 141 logs, traces and LLM observability stories render the same in
both themes; the differences left are live tail offsets, toasts and
loading spinners caught on different frames.
2026-11-25 14:20:48 +00:00
Gaurav Tewari
e085decc05 feat: add support for ai alerts (#13268)
#### Description

Frontend for `AI_TRACES_BASED_ALERT` (backend already supports it,
#12783).

- **Alert type:** "AI Trace-based Alert" card on `/alerts/new`, with its
defaults and alert-type map entries. No docs link until an AI docs page
exists.
- **Editor:** AI alerts open only the AI Query Builder tab (traces, no
trace operator), always in the new editor (classic page and its switch
hidden). Preview, condition query, "Group alerts by" and label-key
checks read the AI slot.
- **Query shape:** the editor keeps AI in its own slot
(`builder_ai_query`), like the dashboard panel editor. It converts to
the wire shape (`builder` + `builder_ai_query` envelopes) only on
preview/save, since a rule's `queryType` must be `builder | promql |
clickhouse_sql`. Saved rules are moved back into the AI slot on edit
(`toAISlotQuery`).
- **Dashboard:** Create Alerts is enabled for AI panels. The link keeps
the AI slot, and the alert page detects AI from the query's `queryType`.
- **History:** the alert popover / top contributors show "View AI
Traces" from `relatedAITracesLink`.

#### Issues closed by this PR


Closes
https://github.com/orgs/SigNoz/projects/59/views/18?pane=issue&itemId=283123867&issue=SigNoz%7Cnerve-pod%7C513


#### Screenshots / Screen Recordings



https://github.com/user-attachments/assets/6663a68a-5eea-4920-b30a-205eeba311d3



#### Additional Information

- was Stacked on #13486 (`refactor/ai-explorer-query-type`).
- Not in scope: Create alert from the AI explorer (its query is still in
the tagged shape; to discuss separately)
- SBSHOT -
https://claude.ai/artifact/X2JQRsNXJ8KCNFcmtgFLMd?sk=CHo7GMdRF6MGhUdbE0PkSg

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-11-25 13:06:39 +00:00
Abhi kumar
415a74938b feat(dashboard): add the distribution chart (#13536)
#### Description

- Adds the `Distribution` chart: bucket counts as bars over equal-width
bucket slots, groups stacked, side by side or as 100% shares; the
overflow bucket is hatched.
- `TooltipPlugin` / `ChartWrapper`: opt-in `pinOnClick`, so a chart can
pin its tooltip on a click instead of handling it.
- New reusable uPlot `variableWidthBars` path builder; hover focuses the
group under the cursor, as the bar panel does.
- Stacked and percent draw every group. Side by side draws as many as
fit (at most 10) and sums the rest into Other, with Pie's Other label
and colour; the legend keeps every group.
- Percentile markers computed client-side the way `histogram_quantile`
does, drawn as dashed lines with diamond badges; hovering one shows its
value on the x axis. Markers on the same spot share one badge (`p90+`).
- Tooltip in the time-series layout: bucket range and total, the hovered
group above the divider, then every group by count, named by its
group-by value. Over Other it lists the groups Other sums; clicking the
Other bar pins it, as on Pie, and a group can then be picked for
drilldown.
- `jest.config`: `modulePathIgnorePatterns` matched any path containing
`dist`, which silently skipped these tests; now only `<rootDir>/dist/`.

#### Additional Information

- Chart-only, on `main`. Stack: this PR → #13535 (spec) → #13537
(panel).
- The jest change may start running other suites under paths containing
`dist`.
2026-11-25 13:04:51 +00:00
hardik-signoz
af3fd93339 fix(authdomain): stack provider title above description and correct role mapping copy (#13747)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description

- Stacks each provider's title above its description in the "Configure
Authentication Method" dialog. They sat inline, so the title ran into
the description, and the Configure buttons started at different x
positions. The text column now fills the row.
- Fixes the group mapping help text. A user in several mapped groups
gets every matching role, not the highest-privilege one.

Before
<img width="565" height="339" alt="image"
src="https://github.com/user-attachments/assets/46016493-ba29-44b5-8012-dd74eddc0a61"
/>

After
<img width="547" height="364" alt="image"
src="https://github.com/user-attachments/assets/59e21df8-0a20-4bc9-97f9-c8d3713173f8"
/>

Before
<img width="1000" height="578" alt="image"
src="https://github.com/user-attachments/assets/d814a2a2-a0aa-40bf-b1c8-e7f476e9e50f"
/>

After
<img width="1011" height="587" alt="image"
src="https://github.com/user-attachments/assets/2775cfca-bc63-4d20-8751-36d6b316e69e"
/>





#### Issues closed by this PR

Closes SigNoz/keystone-pod#233
2026-11-25 08:21:28 +00:00
Ashwin Bhatkal
22a65c4f74 test(frontend): replace DOM traversal in tests with Testing Library queries (#13731)
#### Description

Stacked on [#13729](https://github.com/SigNoz/signoz/pull/13729).

- The 520 DOM lookups left in 148 test files (`querySelector`,
`closest`, `parentElement` and the like) now go through Testing Library:
test IDs first, then role, label or text, scoped with `within`. App
components gain the test IDs this needs.
- A new lint rule, `signoz/no-dom-node-access`, flags these calls in
test files. A test that checks DOM structure on purpose disables it on
that line with a reason; 9 lines do.
- Some checks that could never fail now can: a multi-select filter test
that never typed, role table rows found by a class that matched nothing,
and a query section test whose async loop was never awaited.

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/770

#### Additional Information

- antd `Skeleton` drops `data-*`, so a few loading states gain a wrapper
`div` that carries the test ID (AuthCard, ViewRolePage,
WidgetGraphComponent, TraceDetailsHeader). TraceDetailsHeader's skeleton
class moves to that wrapper, with `display: flex` to keep the layout.
2026-11-25 05:16:03 +00:00
Gaurav Tewari
fa1dbe25cb fix(noz): drop the reply bubble colour and add modal and panel stories (#13740)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
<!--A few plain bullets saying what changed and why, for a reviewer
skimming it - not a wall of text, not a restatement of the diff, not
generated boilerplate.-->
#### Description

- Noz replies lose the grey bubble background in the modal and the side
panel. Width, padding and radius stay as they were; errors keep their
red callout.
- Approval and clarification cards use `border-box`. The modal and panel
portal outside the layout's border-box reset, so the cards ran 26px past
the reply column.
- Adds `Pages/Noz/Modal` and `Pages/Noz/Panel`: every state of the Noz
page story in the ⌘J modal and the floating panel, plus History for the
conversation list behind their headers.

<!--Reference issues using `Closes #issue-number` to enable automatic
closure on merge. -->
#### Issues closed by this PR

<!--If applicable, include screenshots or screen recordings that clearly
show the behavior before the change and the result after the change. -->
#### Screenshots / Screen Recordings

Visual diff (sbshot, both themes):
https://claude.ai/artifact/E1eFXkLUQ6UUvpQ7Mg5SyJ

- 182 pairs at a 0.005 threshold (the grey is below sbshot's default):
53 changed (40 modal, 13 panel), 120 pixel-identical, 9 noise.
- The Noz page and the bottom strip are unchanged.

<!--Anything reviewers should keep in mind while reviewing -->
#### Additional Information

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-11-24 23:05:13 +00:00
1410 changed files with 32854 additions and 4922 deletions

View File

@@ -9,7 +9,7 @@ paths:
Examples and the harness API live in [`frontend/src/tests/README.md`](../../frontend/src/tests/README.md).
- **Import from the harness.** `render`, `screen`, `userEvent`, `waitFor` and the rest come from `tests/test-utils`, never from `@testing-library/react`. The harness mounts the router, React Query, Redux, app context and preferences. When it can't do what a test needs, extend `tests/test-utils` instead of importing around it.
- **Find elements by test ID.** Query with `getByTestId`/`findByTestId` on the `data-testid` or `testId` the component exposes, and add one to the component when it has none. Fall back to role or text only for markup the app doesn't own. A test ID matches exactly one element and survives copy and markup changes; `getByRole` checks the computed style of every element it visits and is the slowest query. Always go through Testing Library (`screen`, `within`), never the DOM: no `querySelector`, `closest`, `container` or `document.body`. Never call a `*ByRole` query inside `waitFor` or a loop: `waitFor` re-runs its callback every 50 ms. Wait with `findByTestId`, then query.
- **Find elements by test ID.** Query with `getByTestId`/`findByTestId` on the `data-testid` or `testId` the component exposes, and add one to the component when it has none. Fall back to role or text only for markup the app doesn't own. A test ID matches exactly one element and survives copy and markup changes; `getByRole` checks the computed style of every element it visits and is the slowest query. Always go through Testing Library (`screen`, `within`), never the DOM: no `querySelector`, `closest`, `container` or `document.body`. `signoz/no-dom-node-access` flags the DOM calls in test files; a test that checks DOM structure on purpose disables it on that line with a reason. Never call a `*ByRole` query inside `waitFor` or a loop: `waitFor` re-runs its callback every 50 ms. Wait with `findByTestId`, then query.
- **Interact like a user.** `const user = userEvent.setup()`, then an awaited `user.click`, `hover`, `keyboard` or `type`. The harness turns off the pointer-events check: Base UI popups sit inside an element with an inline `pointer-events: none`, and the stylesheet that turns it back on for the popup never loads in jsdom, so the check would block every click on them. Never turn it back on. `fireEvent` only for events `userEvent` has no equivalent for: scroll, resize, setting `scrollTop`.
- **Fake timers per test only**, for debounce or throttle, with `userEvent.setup({ advanceTimers: (ms) => jest.advanceTimersByTime(ms) })`. Never global.
- **Network through MSW.** The global server runs for every test; override per test with `server.use(...)` from `mocks-server/server`. Large fixtures go in `mocks-server/__mockdata__`.

View File

@@ -10,5 +10,6 @@
- **Use convensional commit format** for commits and PR title.
- **Do not amend the commits once pushed.** Always create a new commit once changes are pushed to remote.
- **Review fixes are new commits too.** A force push hides what changed from human reviewers and makes Greptile post its findings again. Bring in `main` with a merge; only a stacked branch (`gh stack`) rebases, since the stack moves as a unit.
- **A review fix to an AI-owned file fixes its generator too.** A file with the AI-owned banner (story mocks and plays, `tests/e2e/drivers/`) is rewritten by the skill or agent that made it, so a fix made only in the file comes back on the next run. In the same PR, add the lesson to that skill or agent as a concrete case.
- **Answer every Greptile thread.** Reply with the commit that fixes it (`Fixed in 4df6f3198d: <what changed>`) or the reason it stays, then resolve. Never resolve one with neither: Greptile withdraws a finding, and remembers it, only when told why.
- **Leave human review threads to the author.** Fix the code they ask for, but never reply to or resolve a human reviewer's thread.

View File

@@ -110,8 +110,9 @@ await expect(toggle.getAttribute('aria-checked')).toBe(before);
CI runs each play once, with its story's own args. Anyone can flip a control in the panel, and nothing runs the play against that value, so a play that breaks on it goes unnoticed. Write each play so it cannot.
Before writing the clicks, list what has to be on screen for the play's target to exist, and return early when the args take it away. These are the cases plays have missed:
Before writing the clicks, list what has to be on screen for the play's target to exist. Then walk every control the story exposes, the page's own as well as the shared ones, and return early for each value that takes something on that list away. These are the cases plays have missed:
- An arg the story sets. The story sets it because the play needs what that value renders, and the panel can flip it. On the `mine` view the dashboards Created-by filter opens with a tag to remove; on the other views it opens empty and there is no × to click. Check the tag is there by parsing the route the view resolves to.
- The controls every story has. `State` on loading or error renders no rows and no filter suggestions. `Access`, `Permissions` and `Revoked` remove rows, row actions and gated buttons, and the `editor` and `viewer` presets grant telemetry reads only, so a page gated on its own resource shows them nothing. `Check state` on loading disables every gated control, and on error an `AuthZButton` stays enabled while an `AuthZGuardContent` set to fail closed hides what it wraps. `License` and `Banner` decide the plan, so a cloud-only form is gone on the others. `Hold tooltips open` shows a label a second time, inside its tooltip.
- A count at 0. The page can swap its whole list for an empty state, and the header, filters and column picker go with it.
- A view, filter or invalid query that leaves no rows, even when the count is above 0.

View File

@@ -63,7 +63,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@v5
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.25"
- name: check-semconv-generated-files
@@ -78,7 +78,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@v5
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.25"
- name: qemu-install
@@ -114,7 +114,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@v5
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.25"
- name: generate-openapi
@@ -131,7 +131,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@v5
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.25"
- name: generate-authz
@@ -148,7 +148,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@v5
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.25"
- name: generate-web-settings
@@ -165,7 +165,7 @@ jobs:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@v5
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.25"
- name: generate-transaction-groups

View File

@@ -131,6 +131,10 @@ func runGenerateAuthz(_ context.Context) error {
coretypes.NewResourceRef(coretypes.ResourceMetaResourceNotificationChannel).String(): true,
coretypes.NewResourceRef(coretypes.ResourceUser).String(): true,
coretypes.NewResourceRef(coretypes.ResourceMetaResourceFactorPassword).String(): true,
coretypes.NewResourceRef(coretypes.ResourceMetaResourceIngestionKey).String(): true,
coretypes.NewResourceRef(coretypes.ResourceMetaResourceIngestionLimit).String(): true,
coretypes.NewResourceRef(coretypes.ResourceMetaResourceAuthDomain).String(): true,
coretypes.NewResourceRef(coretypes.ResourceOrganization).String(): true,
}
allowedTypes := map[string]bool{}

View File

@@ -296,6 +296,8 @@
// Bans msw imports in *.stories.tsx; handlers/mock data belong in the sibling .stories.mocks.tsx
"signoz/no-direct-react-router-import": "error",
// Steers call sites to the src/lib/router facade (allowlisted in overrides below)
"signoz/no-builder-ai-query-access": "error",
// Steers AI slot access to lib/query/builderSlot (allowlisted in overrides below)
"no-restricted-globals": [
"error",
{
@@ -316,6 +318,11 @@
"name": "redux",
"message": "[State mgmt] redux is deprecated. Migrate to Zustand, nuqs, or react-query."
},
{
"name": "@signozhq/design-tokens",
"importNames": ["Style"],
"message": "[bundle] Style is a large object of CSS variable strings and is not tree-shaken. Write the CSS variable directly, for example 'var(--l3-foreground)'."
},
{
"name": "react-redux",
"message": "[State mgmt] react-redux is deprecated. Migrate to Zustand, nuqs, or react-query."
@@ -338,6 +345,11 @@
"importNames": ["patchDashboardV2", "usePatchDashboardV2"],
"message": "[dashboard-v2] Don't call patchDashboardV2/usePatchDashboardV2 directly — use useOptimisticPatch().patchAsync so spec edits update the react-query cache optimistically and reconcile on settle."
},
{
"name": "antd/lib",
"allowTypeImports": true,
"message": "[bundle] antd/lib is the CommonJS root and bundles every antd component. Import from 'antd' instead."
},
{
"name": "motion/react-client",
"message": "[motion] motion/react-client is for React Server Components only. Use 'motion/react' instead — it provides the same exports and works correctly in client-side SPAs."
@@ -506,6 +518,7 @@
"ignorePatterns": [
"src/parser/*.ts",
"scripts/update-registry.cjs",
"scripts/generate-permissions-type.cjs",
"**/node_modules",
"**/build",
"**/*.typegen.ts",
@@ -551,6 +564,7 @@
],
"rules": {
"import/first": "off",
"signoz/no-dom-node-access": "error",
// Should ignore due to mocks
"signoz/no-navigator-clipboard": "off",
// Tests can use navigator.clipboard directly,
@@ -558,6 +572,8 @@
"no-restricted-globals": "off",
// Tests need raw localStorage/sessionStorage to seed DOM state for isolation
"signoz/no-zustand-getstate-in-hooks": "off",
"signoz/no-builder-ai-query-access": "off",
// Fixtures build and assert on the raw AI slot
"@typescript-eslint/no-explicit-any": "off", // Tests often need any for mocks/stubs
"@typescript-eslint/explicit-module-boundary-types": "off", // Return types not required in tests
"@typescript-eslint/explicit-function-return-type": "off" // Same as above rule, don't need to care about return type
@@ -614,6 +630,20 @@
"rules": {
"signoz/no-direct-react-router-import": "off"
}
},
{
// builderSlot owns the AI slot; the rest normalise its wire shape or test whether it exists, which the helpers hide
"files": [
"src/lib/query/builderSlot.ts",
"src/hooks/queryBuilder/normalizeCompositeQuery.ts",
"src/hooks/queryBuilder/useGetCompositeQueryParam.ts",
"src/providers/QueryBuilder.tsx",
"src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelKindChange.ts",
"src/pages/DashboardPage/DashboardContainer/Panels/utils/seedBuilderForMode.ts"
],
"rules": {
"signoz/no-builder-ai-query-access": "off"
}
}
]
}

View File

@@ -15,8 +15,6 @@
content="frame-src 'self' blob: data:"
/>
<link rel="stylesheet" href="css/uPlot.min.css" />
<script>
// i18n's language detector would pick the browser locale (e.g. `en-US`), which
// /public/locales does not ship; pin it to the bundled language instead.

View File

@@ -21,7 +21,8 @@ import i18n from '../src/ReactI18';
// `src/index.tsx` does this at boot: without it `@monaco-editor/react` falls back
// to its loader default and pulls Monaco from cdn.jsdelivr.net, which msw does
// not report because the requests look like static assets.
import '../src/lib/monaco/setup';
import '../src/lib/monaco/loader';
import '../src/lib/uPlotStylesheet';
import '../src/styles.scss';
@@ -176,6 +177,7 @@ const preview: Preview = {
'AI Observability',
['Overview', 'Explorer', 'Model Pricing', 'Attribute Mapping'],
'Noz',
['Overview', 'Modal', 'Panel'],
'Metering',
['Cost Meter', 'Usage Explorer'],
'Messaging Queues',
@@ -196,7 +198,9 @@ const preview: Preview = {
['Overview', 'Authz'],
'Service Accounts',
'Ingestion',
['Overview', 'Authz'],
'Single Sign-on',
['Overview', 'Authz'],
'Keyboard Shortcuts',
],
'Auth',

View File

@@ -12,6 +12,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="preconnect" href="https://cdn.vercel.com" crossorigin />
<title data-react-helmet="true">
Open source Observability platform | SigNoz
@@ -156,7 +157,6 @@
})(document, 'script');
}
</script>
<link rel="stylesheet" href="css/uPlot.min.css" />
<script type="module" src="./src/index.tsx"></script>
</body>
</html>

View File

@@ -11,16 +11,17 @@ const config: Config.InitialOptions = {
coverageReporters: ['text', 'cobertura', 'html', 'json-summary'],
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
modulePathIgnorePatterns: ['dist'],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
moduleNameMapper: {
'\\.(png|jpg|jpeg|gif|svg|webp|avif|ico|bmp|tiff)$':
'\\.(png|jpg|jpeg|gif|svg|webp|avif|ico|bmp|tiff|wav)$':
'<rootDir>/__mocks__/fileMock.ts',
// The icon glob module uses `import.meta.glob` (Vite-only); jest can't parse
// it, so redirect any import of it to a stub.
'(^|/)iconAssets$': '<rootDir>/__mocks__/iconAssetsMock.ts',
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(css|scss)$': '<rootDir>/__mocks__/cssMock.ts',
'\\.(css|less|scss)$': '<rootDir>/__mocks__/cssMock.ts',
'\\.module\\.mjs$': '<rootDir>/__mocks__/cssMock.ts',
'\\.md$': '<rootDir>/__mocks__/cssMock.ts',
'^uplot$': '<rootDir>/__mocks__/uplotMock.ts',
'^motion/react$': '<rootDir>/__mocks__/motionMock.tsx',
'^hooks/useSafeNavigate$': USE_SAFE_NAVIGATE_MOCK_PATH,
@@ -55,11 +56,12 @@ const config: Config.InitialOptions = {
},
// TODO: https://github.com/SigNoz/engineering-pod/issues/5334
transformIgnorePatterns: [
// @chenglou/pretext is ESM-only; @signozhq/ui pulls it in via text-ellipsis.
// Pattern 1: allow .pnpm virtual store through (handled by pattern 2), plus root-level ESM packages.
'node_modules/(?!(\\.pnpm|react-json-tree|react-base16-styling|lodash-es|react-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@signozhq/design-tokens|@signozhq|date-fns|d3-interpolate|d3-color|d3-geo|d3-array|internmap|ol|rbush|quickselect|earcut|@codemirror|@lezer|@marijn|@grafana|nuqs|uuid|react-markdown|vfile|vfile-message|unist-util-stringify-position|unified|bail|is-plain-obj|trough|remark-parse|remark-gfm|mdast-util-gfm|mdast-util-gfm-autolink-literal|mdast-util-gfm-footnote|mdast-util-gfm-strikethrough|mdast-util-gfm-table|mdast-util-gfm-task-list-item|mdast-util-find-and-replace|mdast-util-phrasing|mdast-util-to-markdown|markdown-table|longest-streak|ccount|escape-string-regexp|mdast-util-from-markdown|mdast-util-to-string|micromark|micromark-core-commonmark|micromark-extension-gfm|micromark-extension-gfm-autolink-literal|micromark-extension-gfm-footnote|micromark-extension-gfm-strikethrough|micromark-extension-gfm-table|micromark-extension-gfm-tagfilter|micromark-extension-gfm-task-list-item|micromark-factory-destination|micromark-factory-label|micromark-factory-space|micromark-factory-title|micromark-factory-whitespace|micromark-util-character|micromark-util-chunked|micromark-util-classify-character|micromark-util-combine-extensions|micromark-util-decode-numeric-character-reference|micromark-util-decode-string|micromark-util-encode|micromark-util-html-tag-name|micromark-util-normalize-identifier|micromark-util-resolve-all|micromark-util-sanitize-uri|micromark-util-subtokenize|micromark-util-symbol|micromark-util-types|decode-named-character-reference|remark-rehype|mdast-util-to-hast|unist-util-position|trim-lines|unist-util-visit|unist-util-visit-parents|unist-util-is|unist-util-generated|mdast-util-definitions|property-information|hast-util-whitespace|space-separated-tokens|comma-separated-tokens|rehype-raw|hast-util-raw|hast-util-from-parse5|devlop|hastscript|hast-util-parse-selector|vfile-location|web-namespaces|hast-util-to-parse5|zwitch|html-void-elements)/)',
'node_modules/(?!(\\.pnpm|react-json-tree|react-base16-styling|lodash-es|react-dnd|core-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@chenglou/pretext|@signozhq/design-tokens|@signozhq|date-fns|d3-interpolate|d3-color|d3-geo|d3-array|internmap|ol|rbush|quickselect|earcut|api|@codemirror|@lezer|@marijn|@grafana|nuqs|uuid|copy-text-to-clipboard|react-markdown|vfile|vfile-message|unist-util-stringify-position|unified|bail|is-plain-obj|trough|remark-parse|remark-gfm|mdast-util-gfm|mdast-util-gfm-autolink-literal|mdast-util-gfm-footnote|mdast-util-gfm-strikethrough|mdast-util-gfm-table|mdast-util-gfm-task-list-item|mdast-util-find-and-replace|mdast-util-phrasing|mdast-util-to-markdown|markdown-table|longest-streak|ccount|escape-string-regexp|mdast-util-from-markdown|mdast-util-to-string|micromark|micromark-core-commonmark|micromark-extension-gfm|micromark-extension-gfm-autolink-literal|micromark-extension-gfm-footnote|micromark-extension-gfm-strikethrough|micromark-extension-gfm-table|micromark-extension-gfm-tagfilter|micromark-extension-gfm-task-list-item|micromark-factory-destination|micromark-factory-label|micromark-factory-space|micromark-factory-title|micromark-factory-whitespace|micromark-util-character|micromark-util-chunked|micromark-util-classify-character|micromark-util-combine-extensions|micromark-util-decode-numeric-character-reference|micromark-util-decode-string|micromark-util-encode|micromark-util-html-tag-name|micromark-util-normalize-identifier|micromark-util-resolve-all|micromark-util-sanitize-uri|micromark-util-subtokenize|micromark-util-symbol|micromark-util-types|decode-named-character-reference|remark-rehype|mdast-util-to-hast|unist-util-position|trim-lines|unist-util-visit|unist-util-visit-parents|unist-util-is|unist-util-generated|mdast-util-definitions|property-information|hast-util-whitespace|space-separated-tokens|comma-separated-tokens|rehype-raw|hast-util-raw|hast-util-from-parse5|devlop|hastscript|hast-util-parse-selector|vfile-location|web-namespaces|hast-util-to-parse5|zwitch|html-void-elements)/)',
// Pattern 2: pnpm virtual store — ignore everything except ESM-only packages.
// pnpm encodes scoped packages as @scope+name@version, so match on scope prefix.
'node_modules/\\.pnpm/(?!(react-json-tree|react-base16-styling|lodash-es|react-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@signozhq|date-fns|d3-interpolate|d3-color|d3-geo|d3-array|internmap|ol|rbush|quickselect|earcut|@codemirror|@lezer|@marijn|@grafana|nuqs|uuid|react-markdown|vfile|vfile-message|unist-util-stringify-position|unified|bail|is-plain-obj|trough|remark-parse|remark-gfm|mdast-util-gfm|mdast-util-gfm-autolink-literal|mdast-util-gfm-footnote|mdast-util-gfm-strikethrough|mdast-util-gfm-table|mdast-util-gfm-task-list-item|mdast-util-find-and-replace|mdast-util-phrasing|mdast-util-to-markdown|markdown-table|longest-streak|ccount|escape-string-regexp|mdast-util-from-markdown|mdast-util-to-string|micromark|decode-named-character-reference|remark-rehype|mdast-util-to-hast|unist-util-position|trim-lines|unist-util-visit|unist-util-visit-parents|unist-util-is|unist-util-generated|mdast-util-definitions|property-information|hast-util-whitespace|space-separated-tokens|comma-separated-tokens|rehype-raw|hast-util-raw|hast-util-from-parse5|devlop|hastscript|hast-util-parse-selector|vfile-location|web-namespaces|hast-util-to-parse5|zwitch|html-void-elements)[^/]*/node_modules)',
'node_modules/\\.pnpm/(?!(react-json-tree|react-base16-styling|lodash-es|react-dnd|core-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@chenglou|@signozhq|date-fns|d3-interpolate|d3-color|d3-geo|d3-array|internmap|ol|rbush|quickselect|earcut|api|@codemirror|@lezer|@marijn|@grafana|nuqs|uuid|copy-text-to-clipboard|react-markdown|vfile|vfile-message|unist-util-stringify-position|unified|bail|is-plain-obj|trough|remark-parse|remark-gfm|mdast-util-gfm|mdast-util-gfm-autolink-literal|mdast-util-gfm-footnote|mdast-util-gfm-strikethrough|mdast-util-gfm-table|mdast-util-gfm-task-list-item|mdast-util-find-and-replace|mdast-util-phrasing|mdast-util-to-markdown|markdown-table|longest-streak|ccount|escape-string-regexp|mdast-util-from-markdown|mdast-util-to-string|micromark|decode-named-character-reference|remark-rehype|mdast-util-to-hast|unist-util-position|trim-lines|unist-util-visit|unist-util-visit-parents|unist-util-is|unist-util-generated|mdast-util-definitions|property-information|hast-util-whitespace|space-separated-tokens|comma-separated-tokens|rehype-raw|hast-util-raw|hast-util-from-parse5|devlop|hastscript|hast-util-parse-selector|vfile-location|web-namespaces|hast-util-to-parse5|zwitch|html-void-elements)[^/]*/node_modules)',
],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testPathIgnorePatterns: ['/node_modules/', '/public/'],

View File

@@ -8,10 +8,12 @@
import { TextDecoder, TextEncoder } from 'node:util';
import '@testing-library/jest-dom';
import '@testing-library/jest-dom/extend-expect';
import 'jest-styled-components';
import { server } from './src/mocks-server/server';
import './src/styles.scss';
// Establish API mocking before all tests.
// react-router@7's entry point pulls in its server-runtime cookie signing,
@@ -50,8 +52,8 @@ if (!Range.prototype.getClientRects) {
document.body.getBoundingClientRect();
}
// jsdom doesn't implement the Pointer Capture API, which Base UI primitives
// (e.g. @signozhq/ui Slider and ScrollArea) call. Stub them so those components
// jsdom doesn't implement the Pointer Capture API, which Radix UI primitives
// (e.g. @signozhq/ui Select) call when opening. Stub them so those components
// can be exercised in tests.
if (!HTMLElement.prototype.hasPointerCapture) {
HTMLElement.prototype.hasPointerCapture = function (): boolean {

View File

@@ -1,18 +1,8 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": [
"scripts/**/*.{mjs,cjs}",
"src/storybook/mocks/*.mock.{ts,tsx}",
"src/tests/userEventWithDefaults.ts"
],
"project": ["src/**/*.ts", "src/**/*.tsx"],
"ignore": [
"src/api/generated/**/*.ts",
"src/typings/*.ts",
"src/constants/generated/semconvFamilies.gen.ts",
".storybook/public/**"
],
"ignore": ["src/api/generated/**/*.ts", "src/typings/*.ts"],
"ignoreDependencies": [
"@typescript/native-preview"
]
}
}

View File

@@ -57,7 +57,7 @@
"@signozhq/design-tokens": "2.8.0",
"@signozhq/icons": "0.4.0",
"@signozhq/noz-client": "1.13.0",
"@signozhq/ui": "0.4.0-rc.5",
"@signozhq/ui": "0.4.1-rc.2",
"@tanstack/react-table": "8.21.3",
"@tanstack/react-virtual": "3.13.22",
"@uiw/codemirror-theme-copilot": "4.23.11",

View File

@@ -0,0 +1,59 @@
import { ruleTester } from './rule-tester.mjs';
const message =
'from lib/query/builderSlot instead of accessing builder_ai_query';
await ruleTester({
rule: 'no-builder-ai-query-access',
valid: [
{
name: 'reading through the slot helper',
code: 'export const data = getActiveBuilder(query).queryData;',
},
{
name: 'reading the builder slot',
code: 'export const data = query.builder.queryData;',
},
{
name: 'building a query with the AI slot',
code: 'export const next = { ...query, builder_ai_query: builder };',
},
{
name: 'generated enum member',
code:
'export const type = Querybuildertypesv5QueryTypeDTO.builder_ai_query;',
},
{
name: 'type position',
code: "export type Slot = Query['builder_ai_query'];",
},
],
invalid: [
{
name: 'picking the slot by query type',
code:
'export const data =\n\tquery.queryType === EQueryType.AI_QUERY_BUILDER\n\t\t? query.builder_ai_query?.queryData\n\t\t: query.builder.queryData;',
errors: [{ message, line: 3 }],
},
{
name: 'optional chaining',
code: 'export const slot = query?.builder_ai_query;',
errors: [{ message, line: 1 }],
},
{
name: 'writing the slot',
code: 'query.builder_ai_query = builder;',
errors: [{ message, line: 1 }],
},
{
name: 'bracket access',
code: "export const slot = query['builder_ai_query'];",
errors: [{ message, line: 1 }],
},
{
name: 'destructuring',
code: 'export const { builder_ai_query: slot } = query;',
errors: [{ message, line: 1 }],
},
],
});

View File

@@ -0,0 +1,60 @@
import { ruleTester } from './rule-tester.mjs';
const message = (name) =>
`Find elements through Testing Library (\`screen\`, \`within\`) instead of \`${name}\`.`;
await ruleTester({
rule: 'no-dom-node-access',
valid: [
{
name: 'Testing Library queries',
code: "within(screen.getByTestId('row')).getByText('Name');",
},
{
name: 'a query method that is not called',
code:
'jest.spyOn(document, "querySelector");\nconst q = Element.prototype.closest;',
},
{
name: 'computed access',
code: "const name = 'closest';\nel[name]('tr');",
},
],
invalid: [
{
name: 'querySelector on the container',
code: "container.querySelector('.row');",
errors: [{ message: message('querySelector'), line: 1, column: 11 }],
},
{
name: 'closest after a screen query',
code: "screen.getByText('Name').closest('tr');",
errors: [{ message: message('closest'), line: 1, column: 26 }],
},
{
name: 'optional call',
code: "row?.querySelectorAll('td');",
errors: [{ message: message('querySelectorAll'), line: 1, column: 6 }],
},
{
name: 'traversal property',
code: 'expect(cell.parentElement).toBeVisible();',
errors: [{ message: message('parentElement'), line: 1, column: 13 }],
},
{
name: 'children of a DOM node',
code: "expect(screen.getByTestId('list').children).toHaveLength(2);",
errors: [{ message: message('children'), line: 1, column: 35 }],
},
{
name: 'children of a data tree',
code: 'expect(tree.children).toHaveLength(2);',
errors: [{ message: message('children'), line: 1, column: 13 }],
},
{
name: 'document lookup by id',
code: "document.getElementById('root');",
errors: [{ message: message('getElementById'), line: 1, column: 10 }],
},
],
});

View File

@@ -18,7 +18,7 @@ const BANNED_COMPONENTS = {
'Use @signozhq/ui/typography Typography instead of antd Typography.',
Switch: 'Use @signozhq/ui/switch Switch instead of antd Switch.',
Dropdown:
'Use @signozhq/ui/dropdown Dropdown instead of antd Dropdown.',
'Use @signozhq/ui DropdownMenuSimple (or the composable DropdownMenu primitives) from @signozhq/ui/dropdown-menu instead of antd Dropdown.',
Badge: 'Use @signozhq/ui/badge instead of antd Badge.',
Radio:
'Use @signozhq/ui/radio-group RadioGroup (dots) or @signozhq/ui/toggle-group ToggleGroup (segmented buttons) instead of antd Radio.',

View File

@@ -0,0 +1,51 @@
const SLOT = 'builder_ai_query';
function isSlotKey(key, computed) {
if (key.type === 'Literal') {
return key.value === SLOT;
}
return !computed && key.type === 'Identifier' && key.name === SLOT;
}
// Generated enums like Querybuildertypesv5QueryTypeDTO.builder_ai_query are not queries
function isGeneratedEnum(object) {
return object.type === 'Identifier' && /^[A-Z]/.test(object.name);
}
export default {
meta: {
type: 'suggestion',
docs: {
description:
'Disallow direct builder_ai_query access; use the lib/query/builderSlot helpers',
category: 'Query Builder',
},
schema: [],
messages: {
useSlotHelper:
'Use getActiveBuilder, getBuilderBySlotKey or replaceBuilderBySlotKey from lib/query/builderSlot instead of accessing builder_ai_query directly.',
},
},
create(context) {
return {
MemberExpression(node) {
if (
isSlotKey(node.property, node.computed) &&
!isGeneratedEnum(node.object)
) {
context.report({ node, messageId: 'useSlotHelper' });
}
},
ObjectPattern(node) {
node.properties.forEach((property) => {
if (
property.type === 'Property' &&
isSlotKey(property.key, property.computed)
) {
context.report({ node: property, messageId: 'useSlotHelper' });
}
});
},
};
},
};

View File

@@ -0,0 +1,60 @@
/**
* Rule: no-dom-node-access
*
* Tests find elements through Testing Library (`screen`, `within`), not by
* walking the DOM. Flags calls to DOM query methods and reads of node
* traversal properties:
* container.querySelector('.row')
* screen.getByText('Name').closest('tr')
* cell.parentElement
* list.children
*
* A non-DOM `children` read (a data tree, React props) disables the rule on
* that line with a reason.
*/
const QUERY_METHODS = new Set([
'querySelector',
'querySelectorAll',
'closest',
'getElementById',
'getElementsByClassName',
'getElementsByTagName',
'getElementsByName',
]);
const TRAVERSAL_PROPERTIES = new Set([
'parentElement',
'parentNode',
'firstChild',
'lastChild',
'firstElementChild',
'lastElementChild',
'nextSibling',
'previousSibling',
'nextElementSibling',
'previousElementSibling',
'childNodes',
'children',
]);
export default {
create(context) {
return {
MemberExpression(node) {
if (node.computed || node.property.type !== 'Identifier') {
return;
}
const { name } = node.property;
const isCall =
node.parent?.type === 'CallExpression' && node.parent.callee === node;
if ((isCall && QUERY_METHODS.has(name)) || TRAVERSAL_PROPERTIES.has(name)) {
context.report({
node: node.property,
message: `Find elements through Testing Library (\`screen\`, \`within\`) instead of \`${name}\`.`,
});
}
},
};
},
};

View File

@@ -12,10 +12,10 @@
* And expects:
* import { Typography } from '@signozhq/ui/typography'
* import { Button } from '@signozhq/ui/button'
* import { toast } from '@signozhq/ui/toast'
* import { toast } from '@signozhq/ui/sonner'
*
* Why: the barrel eagerly require()s every component along with their
* Base UI/react-day-picker dependencies. Under Jest this caused
* Why: the barrel eagerly require()s every component (~90 of them) along with
* their Radix/cmdk/motion/react-day-picker dependencies. Under Jest this caused
* 5s timeouts and flaky tests after the Antd→@signozhq/ui Typography migration
* (#11199). Subpath imports (added in @signozhq/ui@0.0.18) load only what's
* used.
@@ -198,7 +198,7 @@ export default {
const report = {
node: node.source,
message:
"Do not import from the '@signozhq/ui' barrel. Use the matching subpath instead (e.g. '@signozhq/ui/typography', '@signozhq/ui/button', '@signozhq/ui/toast'). The barrel eagerly loads every component and slows tests substantially.",
"Do not import from the '@signozhq/ui' barrel. Use the matching subpath instead (e.g. '@signozhq/ui/typography', '@signozhq/ui/button', '@signozhq/ui/sonner'). The barrel eagerly loads ~90 components and slows tests substantially.",
};
if (replacement) {
report.fix = (fixer) => fixer.replaceText(node, replacement);

View File

@@ -19,6 +19,8 @@ import noMswInStoryFile from './rules/no-msw-in-story-file.mjs';
import noDirectReactRouterImport from './rules/no-direct-react-router-import.mjs';
import noTextCss from './rules/no-text-css.mjs';
import requireDisableReason from './rules/require-disable-reason.mjs';
import noDomNodeAccess from './rules/no-dom-node-access.mjs';
import noBuilderAiQueryAccess from './rules/no-builder-ai-query-access.mjs';
export default {
meta: {
@@ -39,5 +41,7 @@ export default {
'no-direct-react-router-import': noDirectReactRouterImport,
'no-text-css': noTextCss,
'require-disable-reason': requireDisableReason,
'no-dom-node-access': noDomNodeAccess,
'no-builder-ai-query-access': noBuilderAiQueryAccess,
},
};

View File

@@ -86,8 +86,8 @@ importers:
specifier: 1.13.0
version: 1.13.0(axios@1.21.1)(react-query@3.39.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)
'@signozhq/ui':
specifier: 0.4.0-rc.5
version: 0.4.0-rc.5(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
specifier: 0.4.1-rc.2
version: 0.4.1-rc.2(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
'@tanstack/react-table':
specifier: 8.21.3
version: 8.21.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
@@ -3258,8 +3258,8 @@ packages:
react: ^18.2.0
react-query: ^3.39.3
'@signozhq/ui@0.4.0-rc.5':
resolution: {integrity: sha512-WlJMfeDfvL2hjMpTpHhhND/tuK7X0sfXQlx6E1ZG+6E/DYHpuhYljfvW3E6/BohIlHFlTyCs/ZMl9wnV2k9Zcw==}
'@signozhq/ui@0.4.1-rc.2':
resolution: {integrity: sha512-pCMRzrJ6CmGjEgAQ2B6wRRengP2sy7Y860Npr5nkCapc9NPH5jy4VO48CDv5gnKwWSKShmLHwzbiK2E1cGndKQ==}
peerDependencies:
'@signozhq/design-tokens': '>=2.7.0'
'@signozhq/icons': 0.3.0
@@ -12389,7 +12389,7 @@ snapshots:
react: 18.2.0
react-query: 3.39.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
'@signozhq/ui@0.4.0-rc.5(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)':
'@signozhq/ui@0.4.1-rc.2(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)':
dependencies:
'@base-ui/react': 1.8.0(@date-fns/tz@1.4.1)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
'@signozhq/design-tokens': 2.8.0

View File

@@ -1 +0,0 @@
.uplot, .uplot *, .uplot *::before, .uplot *::after {box-sizing: border-box;}.uplot {font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";line-height: 1.5;width: min-content;}.u-title {text-align: center;font-size: 18px;font-weight: bold;}.u-wrap {position: relative;user-select: none;}.u-over, .u-under {position: absolute;}.u-under {overflow: hidden;}.uplot canvas {display: block;position: relative;width: 100%;height: 100%;}.u-axis {position: absolute;}.u-legend {font-size: 14px;margin: auto;text-align: center;}.u-inline {display: block;}.u-inline * {display: inline-block;}.u-inline tr {margin-right: 16px;}.u-legend th {font-weight: 600;}.u-legend th > * {vertical-align: middle;display: inline-block;}.u-legend .u-marker {width: 1em;height: 1em;margin-right: 4px;background-clip: padding-box !important;}.u-inline.u-live th::after {content: ":";vertical-align: middle;}.u-inline:not(.u-live) .u-value {display: none;}.u-series > * {padding: 4px;}.u-series th {cursor: pointer;}.u-legend .u-off > * {opacity: 0.3;}.u-select {background: rgba(0,0,0,0.07);position: absolute;pointer-events: none;}.u-cursor-x, .u-cursor-y {position: absolute;left: 0;top: 0;pointer-events: none;will-change: transform;}.u-hz .u-cursor-x, .u-vt .u-cursor-y {height: 100%;border-right: 1px dashed #607D8B;}.u-hz .u-cursor-y, .u-vt .u-cursor-x {width: 100%;border-bottom: 1px dashed #607D8B;}.u-cursor-pt {position: absolute;top: 0;left: 0;border-radius: 50%;border: 0 solid;pointer-events: none;will-change: transform;/*this has to be !important since we set inline "background" shorthand */background-clip: padding-box !important;}.u-axis.u-off, .u-select.u-off, .u-cursor-x.u-off, .u-cursor-y.u-off, .u-cursor-pt.u-off {display: none;}

View File

@@ -117,6 +117,8 @@
"log_based_alert_desc": "Send a notification when a condition occurs in the logs data.",
"traces_based_alert": "Trace-based Alert",
"traces_based_alert_desc": "Send a notification when a condition occurs in the traces data.",
"ai_traces_based_alert": "AI Trace-based Alert",
"ai_traces_based_alert_desc": "Send a notification when a condition occurs in AI and LLM traces.",
"exceptions_based_alert": "Exceptions-based Alert",
"exceptions_based_alert_desc": "Send a notification when a condition occurs in the exceptions data.",
"field_unit": "Threshold unit",

View File

@@ -121,6 +121,8 @@
"log_based_alert_desc": "Send a notification when a condition occurs in the logs data.",
"traces_based_alert": "Trace-based Alert",
"traces_based_alert_desc": "Send a notification when a condition occurs in the traces data.",
"ai_traces_based_alert": "AI Trace-based Alert",
"ai_traces_based_alert_desc": "Send a notification when a condition occurs in AI and LLM traces.",
"exceptions_based_alert": "Exceptions-based Alert",
"exceptions_based_alert_desc": "Send a notification when a condition occurs in the exceptions data.",
"field_unit": "Threshold unit",

View File

@@ -175,8 +175,8 @@ function PrivateRoute({ children }: PrivateRouteProps): JSX.Element {
pathname === ROUTES.SETTINGS ||
pathname === ROUTES.BILLING ||
pathname === ROUTES.MEMBERS_SETTINGS ||
(isAdmin &&
(pathname === ROUTES.ORG_SETTINGS || pathname === ROUTES.MY_SETTINGS));
pathname === ROUTES.ORG_SETTINGS ||
(isAdmin && pathname === ROUTES.MY_SETTINGS);
if (
pathname !== ROUTES.WORKSPACE_LOCKED &&

View File

@@ -808,7 +808,7 @@ describe('PrivateRoute', () => {
assertStaysOnRoute(ROUTES.BILLING);
});
it('should redirect VIEWER to workspace locked when trying to access org-settings', async () => {
it('should allow VIEWER to access org-settings when workspace is blocked', () => {
renderPrivateRoute({
initialRoute: ROUTES.ORG_SETTINGS,
appContext: {
@@ -821,7 +821,7 @@ describe('PrivateRoute', () => {
isCloudUser: true,
});
await assertRedirectsTo(ROUTES.WORKSPACE_LOCKED);
assertStaysOnRoute(ROUTES.ORG_SETTINGS);
});
it('should allow VIEWER to access members settings when workspace is blocked', () => {
@@ -1707,6 +1707,7 @@ describe('PrivateRoute', () => {
// Everything under /settings resolves to the non-exact SETTINGS route
SETTINGS: { path: ROUTES.SETTINGS, deniedRoles: DENIED_ROLES },
MY_SETTINGS: { path: ROUTES.MY_SETTINGS, deniedRoles: DENIED_ROLES },
ORG_SETTINGS: { path: ROUTES.ORG_SETTINGS, deniedRoles: DENIED_ROLES },
ROLES_SETTINGS: { path: ROUTES.ROLES_SETTINGS, deniedRoles: DENIED_ROLES },
ROLE_CREATE: { path: ROUTES.ROLE_CREATE, deniedRoles: DENIED_ROLES },
ROLE_DETAILS: {

View File

@@ -129,6 +129,18 @@ export const StatusPage = Loadable(
() => import(/* webpackChunkName: "All Status" */ 'pages/Status'),
);
export const OrganizationSettings = Loadable(
() => import(/* webpackChunkName: "All Settings" */ 'pages/Settings'),
);
export const IngestionSettings = Loadable(
() => import(/* webpackChunkName: "Ingestion Settings" */ 'pages/Settings'),
);
export const MySettings = Loadable(
() => import(/* webpackChunkName: "All MySettings" */ 'pages/Settings'),
);
export const Logs = Loadable(
() => import(/* webpackChunkName: "Logs" */ 'pages/LogsModulePage'),
);
@@ -169,6 +181,10 @@ export const LogsIndexToFields = Loadable(
import(/* webpackChunkName: "LogsIndexToFields Page" */ 'pages/LogsSettings'),
);
export const BillingPage = Loadable(
() => import(/* webpackChunkName: "BillingPage" */ 'pages/Settings'),
);
export const SupportPage = Loadable(
() => import(/* webpackChunkName: "SupportPage" */ 'pages/Support'),
);
@@ -192,6 +208,10 @@ export const WorkspaceAccessRestricted = Loadable(
),
);
export const ShortcutsPage = Loadable(
() => import(/* webpackChunkName: "ShortcutsPage" */ 'pages/Settings'),
);
export const Integrations = Loadable(
() =>
import(
@@ -210,6 +230,13 @@ export const MessagingQueuesMainPage = Loadable(
import(/* webpackChunkName: "MessagingQueues" */ 'pages/MessagingQueues'),
);
export const MQDetailPage = Loadable(
() =>
import(
/* webpackChunkName: "MQDetailPage" */ 'pages/MessagingQueues/MQDetailPage'
),
);
export const InfrastructureMonitoring = Loadable(
() =>
import(
@@ -217,6 +244,20 @@ export const InfrastructureMonitoring = Loadable(
),
);
export const CeleryTask = Loadable(
() =>
import(
/* webpackChunkName: "CeleryTask" */ 'pages/Celery/CeleryTask/CeleryTask'
),
);
export const CeleryOverview = Loadable(
() =>
import(
/* webpackChunkName: "CeleryOverview" */ 'pages/Celery/CeleryOverview/CeleryOverview'
),
);
export const MetricsExplorer = Loadable(
() =>
import(/* webpackChunkName: "MetricsExplorer" */ 'pages/MetricsExplorer'),

View File

@@ -19,7 +19,7 @@ export const SIGNOZ_URL_HEADER = 'X-SigNoz-URL';
* needs the originating SigNoz instance URL for multi-tenant deployments;
* when omitted it falls back to its `SIGNOZ_API_URL` env var.
*/
const interceptorsRequestSigNozUrl = (
export const interceptorsRequestSigNozUrl = (
value: InternalAxiosRequestConfig,
): InternalAxiosRequestConfig => {
if (value.headers) {

View File

@@ -35,6 +35,7 @@ import type {
ClarifyResponseDTO,
CreateMessageResponseDTO,
CreateThreadResponseDTO,
ExecutionStateDTO,
FeedbackRatingDTO,
ListThreadsApiV1AssistantThreadsGetArchived,
ListThreadsApiV1AssistantThreadsGetParams,
@@ -176,6 +177,9 @@ async function fetchSSEWithAuth(
return res;
}
/** String-literal view of `ExecutionStateDTO` for ergonomic comparisons. */
export type ExecutionState = `${ExecutionStateDTO}`;
// ---------------------------------------------------------------------------
// Re-exported DTOs — the wire shape, used directly without remapping.
// ---------------------------------------------------------------------------
@@ -371,7 +375,7 @@ async function* readSSEReader(
* Carries the HTTP status so callers can branch on rate-limit vs. other
* failures (e.g. show a "please wait a moment" message on 429).
*/
class SSEStreamError extends Error {
export class SSEStreamError extends Error {
status: number;
constructor(status: number, statusText: string) {

View File

@@ -0,0 +1,34 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import convertObjectIntoParams from 'lib/query/convertObjectIntoParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/alerts/getTriggered';
/**
* @deprecated Use the generated `useGetAlerts` hook (or `getAlerts` fetcher) from
* `api/generated/services/alerts` instead. This hand-written client targets the
* same endpoint and will be removed once call sites migrate.
*
* Part of https://github.com/SigNoz/engineering-pod/issues/5289, add a comment or update when removing this method.
*/
const getTriggered = async (
props: Props,
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
try {
const queryParams = convertObjectIntoParams(props);
const response = await axios.get(`/alerts?${queryParams}`);
return {
statusCode: 200,
error: null,
message: response.data.status,
payload: response.data.data,
};
} catch (error) {
return ErrorResponseHandler(error as AxiosError);
}
};
export default getTriggered;

View File

@@ -17,13 +17,11 @@ function loadGetModule(href: string): GetModule {
// oxlint-disable-next-line typescript-eslint/no-require-imports, typescript-eslint/no-var-requires
mod = require('../get');
});
base.remove();
return mod;
}
afterEach(() => {
for (const el of document.head.querySelectorAll('base')) {
el.remove();
}
localStorage.clear();
});

View File

@@ -15,13 +15,11 @@ function loadGetModule(href: string): GetModule {
// oxlint-disable-next-line typescript-eslint/no-require-imports, typescript-eslint/no-var-requires
mod = require('../get');
});
base.remove();
return mod;
}
afterEach(() => {
for (const el of document.head.querySelectorAll('base')) {
el.remove();
}
sessionStorage.clear();
});

View File

@@ -40,3 +40,5 @@ export const getFieldKeys = async (
ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);
}
};
export default getFieldKeys;

View File

@@ -93,3 +93,5 @@ export const getFieldValues = async (
ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);
}
};
export default getFieldValues;

View File

@@ -15,6 +15,37 @@ const generatedAPIAxiosInstance = axios.create({
paramsSerializer: { indexes: null },
});
let generatedAPIQueryKeyHeaderContext: Record<string, unknown> | undefined;
export const setGeneratedAPIQueryKeyHeaderContext = <THeaders extends object>(
headers?: THeaders,
): void => {
generatedAPIQueryKeyHeaderContext = headers
? { ...(headers as Record<string, unknown>) }
: undefined;
};
const hashHeaderValue = (value: string): string => {
let hash = 0;
for (let index = 0; index < value.length; index += 1) {
hash = (hash * 31 + value.charCodeAt(index)) >>> 0;
}
return hash.toString(16);
};
const mergeHeaderRecord = (
target: Record<string, unknown>,
source: unknown,
): Record<string, unknown> => {
if (!source || typeof source !== 'object') {
return target;
}
return Object.assign(target, source as Record<string, unknown>);
};
export const GeneratedAPIInstance = <T>(
config: AxiosRequestConfig,
): Promise<T> => {
@@ -29,5 +60,59 @@ generatedAPIAxiosInstance.interceptors.response.use(
interceptorRejected,
);
const getDefaultQueryKeyHeaders = (): Record<string, unknown> => {
const defaults = generatedAPIAxiosInstance.defaults
.headers as unknown as Record<string, unknown>;
const headers: Record<string, unknown> = {};
const methodKeys = new Set([
'common',
'delete',
'get',
'head',
'options',
'patch',
'post',
'put',
]);
mergeHeaderRecord(headers, defaults?.common);
mergeHeaderRecord(headers, defaults?.get);
for (const [key, value] of Object.entries(defaults ?? {})) {
if (!methodKeys.has(key)) {
headers[key] = value;
}
}
return headers;
};
export const getGeneratedAPIQueryKeyHeaders = <THeaders extends object>(
headers?: THeaders,
): [{ headers: Record<string, unknown> }] | [] => {
const mergedHeaders = {
...getDefaultQueryKeyHeaders(),
...generatedAPIQueryKeyHeaderContext,
...(headers as Record<string, unknown> | undefined),
};
const queryKeyHeaders = Object.fromEntries(
Object.entries(mergedHeaders)
.filter(([, value]) => value !== undefined)
.sort(([left], [right]) => left.localeCompare(right))
.map(([key, value]) => {
if (key.toLowerCase() === 'authorization' && typeof value === 'string') {
return [key, hashHeaderValue(value)];
}
return [key, value];
}),
);
return Object.keys(queryKeyHeaders).length
? [{ headers: queryKeyHeaders }]
: [];
};
export type ErrorType<Error> = AxiosError<Error>;
export type BodyType<BodyData> = BodyData;

View File

@@ -179,7 +179,7 @@ instance.interceptors.request.use(interceptorsRequestResponse);
instance.interceptors.request.use(interceptorsRequestBasePath);
instance.interceptors.response.use(interceptorsResponse, interceptorRejected);
const AxiosAlertManagerInstance = axios.create({
export const AxiosAlertManagerInstance = axios.create({
baseURL: `${ENVIRONMENT.baseURL}${apiAlertManager}`,
});
@@ -252,4 +252,5 @@ AxiosAlertManagerInstance.interceptors.response.use(
AxiosAlertManagerInstance.interceptors.request.use(interceptorsRequestResponse);
AxiosAlertManagerInstance.interceptors.request.use(interceptorsRequestBasePath);
export { apiV1 };
export default instance;

View File

@@ -0,0 +1,50 @@
import { ApiV3Instance } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError, AxiosResponse } from 'axios';
import { baseAutoCompleteIdKeysOrder } from 'constants/queryBuilder';
import { createIdFromObjectFields } from 'lib/createIdFromObjectFields';
import createQueryParams from 'lib/createQueryParams';
// ** Helpers
import { ErrorResponse, SuccessResponse } from 'types/api';
// ** Types
import { IGetAggregateAttributePayload } from 'types/api/queryBuilder/getAggregatorAttribute';
import {
BaseAutocompleteData,
IQueryAutocompleteResponse,
} from 'types/api/queryBuilder/queryAutocompleteResponse';
export const getAggregateAttribute = async ({
aggregateOperator,
searchText,
dataSource,
source,
}: IGetAggregateAttributePayload): Promise<
SuccessResponse<IQueryAutocompleteResponse> | ErrorResponse
> => {
try {
const response: AxiosResponse<{
data: IQueryAutocompleteResponse;
}> = await ApiV3Instance.get(
`/autocomplete/aggregate_attributes?${createQueryParams({
aggregateOperator,
searchText,
dataSource: source === 'meter' ? 'meter' : dataSource,
})}`,
);
const payload: BaseAutocompleteData[] =
response.data.data.attributeKeys?.map(({ id: _, ...item }) => ({
...item,
id: createIdFromObjectFields(item, baseAutoCompleteIdKeysOrder),
})) || [];
return {
statusCode: 200,
error: null,
message: response.statusText,
payload: { attributeKeys: payload },
};
} catch (e) {
return ErrorResponseHandler(e as AxiosError);
}
};

View File

@@ -0,0 +1,50 @@
import { ApiV3Instance } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError, AxiosResponse } from 'axios';
import { baseAutoCompleteIdKeysOrder } from 'constants/queryBuilder';
import { createIdFromObjectFields } from 'lib/createIdFromObjectFields';
import createQueryParams from 'lib/createQueryParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { IGetAttributeKeysPayload } from 'types/api/queryBuilder/getAttributeKeys';
import {
BaseAutocompleteData,
IQueryAutocompleteResponse,
} from 'types/api/queryBuilder/queryAutocompleteResponse';
export const getAggregateKeys = async ({
aggregateOperator,
searchText,
dataSource,
aggregateAttribute,
tagType,
}: IGetAttributeKeysPayload): Promise<
SuccessResponse<IQueryAutocompleteResponse> | ErrorResponse
> => {
try {
const response: AxiosResponse<{
data: IQueryAutocompleteResponse;
}> = await ApiV3Instance.get(
`/autocomplete/attribute_keys?${createQueryParams({
aggregateOperator,
searchText,
dataSource,
aggregateAttribute,
})}&tagType=${tagType}`,
);
const payload: BaseAutocompleteData[] =
response.data.data.attributeKeys?.map(({ id: _, ...item }) => ({
...item,
id: createIdFromObjectFields(item, baseAutoCompleteIdKeysOrder),
})) || [];
return {
statusCode: 200,
error: null,
message: response.statusText,
payload: { attributeKeys: payload },
};
} catch (e) {
return ErrorResponseHandler(e as AxiosError);
}
};

View File

@@ -0,0 +1,63 @@
import { ApiV3Instance } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError, AxiosResponse } from 'axios';
import { baseAutoCompleteIdKeysOrder } from 'constants/queryBuilder';
import { encode } from 'js-base64';
import { createIdFromObjectFields } from 'lib/createIdFromObjectFields';
import createQueryParams from 'lib/createQueryParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
IGetAttributeSuggestionsPayload,
IGetAttributeSuggestionsSuccessResponse,
} from 'types/api/queryBuilder/getAttributeSuggestions';
import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';
export const getAttributeSuggestions = async ({
searchText,
dataSource,
filters,
}: IGetAttributeSuggestionsPayload): Promise<
SuccessResponse<IGetAttributeSuggestionsSuccessResponse> | ErrorResponse
> => {
try {
let base64EncodedFiltersString;
try {
// the replace function is to remove the padding at the end of base64 encoded string which is auto added to make it a multiple of 4
// why ? because the current working of qs doesn't work well with padding
base64EncodedFiltersString = encode(JSON.stringify(filters)).replace(
/=+$/,
'',
);
} catch {
// default base64 encoded string for empty filters object
base64EncodedFiltersString = 'eyJpdGVtcyI6W10sIm9wIjoiQU5EIn0';
}
const response: AxiosResponse<{
data: IGetAttributeSuggestionsSuccessResponse;
}> = await ApiV3Instance.get(
`/filter_suggestions?${createQueryParams({
searchText,
dataSource,
existingFilter: base64EncodedFiltersString,
})}`,
);
const payload: BaseAutocompleteData[] =
response.data.data.attributes?.map(({ id: _, ...item }) => ({
...item,
id: createIdFromObjectFields(item, baseAutoCompleteIdKeysOrder),
})) || [];
return {
statusCode: 200,
error: null,
message: response.statusText,
payload: {
attributes: payload,
example_queries: response.data.data.example_queries,
},
};
} catch (e) {
return ErrorResponseHandler(e as AxiosError);
}
};

View File

@@ -0,0 +1,42 @@
import { ApiV3Instance } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import createQueryParams from 'lib/createQueryParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
IAttributeValuesResponse,
IGetAttributeValuesPayload,
} from 'types/api/queryBuilder/getAttributesValues';
export const getAttributesValues = async ({
aggregateOperator,
dataSource,
aggregateAttribute,
attributeKey,
filterAttributeKeyDataType,
tagType,
searchText,
}: IGetAttributeValuesPayload): Promise<
SuccessResponse<IAttributeValuesResponse> | ErrorResponse
> => {
try {
const response = await ApiV3Instance.get(
`/autocomplete/attribute_values?${createQueryParams({
aggregateOperator,
dataSource,
aggregateAttribute,
attributeKey,
searchText,
})}&filterAttributeKeyDataType=${filterAttributeKeyDataType}&tagType=${tagType}`,
);
return {
statusCode: 200,
error: null,
message: response.data.status,
payload: response.data.data,
};
} catch (error) {
return ErrorResponseHandler(error as AxiosError);
}
};

View File

@@ -0,0 +1,27 @@
import { ApiV2Instance as axios } from 'api';
import { omit } from 'lodash-es';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
GetTraceFlamegraphPayloadProps,
GetTraceFlamegraphSuccessResponse,
} from 'types/api/trace/getTraceFlamegraph';
const getTraceFlamegraph = async (
props: GetTraceFlamegraphPayloadProps,
): Promise<
SuccessResponse<GetTraceFlamegraphSuccessResponse> | ErrorResponse
> => {
const response = await axios.post<GetTraceFlamegraphSuccessResponse>(
`/traces/flamegraph/${props.traceId}`,
omit(props, 'traceId'),
);
return {
statusCode: 200,
error: null,
message: 'Success',
payload: response.data,
};
};
export default getTraceFlamegraph;

View File

@@ -150,6 +150,15 @@ export const validateFunnelSteps = async (
};
};
export interface UpdateFunnelStepDetailsPayload {
funnel_id: string;
steps: Array<{
step_name: string;
description: string;
}>;
updated_at: number;
}
interface UpdateFunnelDescriptionPayload {
funnel_id: string;
description: string;

View File

@@ -73,3 +73,5 @@ export const downloadExportData = async (
ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);
}
};
export default downloadExportData;

View File

@@ -1,11 +1,24 @@
// V5 Query Range Constants
import { RequestType } from 'types/api/v5/queryRange';
import { ENTITY_VERSION_V5 } from 'constants/app';
import {
FunctionName,
RequestType,
SignalType,
Step,
} from 'types/api/v5/queryRange';
// ===================== Schema and Version Constants =====================
export const SCHEMA_VERSION_V5 = ENTITY_VERSION_V5;
export const API_VERSION_V5 = 'v5';
// ===================== Default Values =====================
export const DEFAULT_STEP_INTERVAL: Step = '60s';
export const DEFAULT_LIMIT = 100;
export const DEFAULT_OFFSET = 0;
// ===================== Request Type Constants =====================
export const REQUEST_TYPES: Record<string, RequestType> = {
@@ -17,14 +30,139 @@ export const REQUEST_TYPES: Record<string, RequestType> = {
// ===================== Signal Type Constants =====================
export const SIGNAL_TYPES: Record<string, SignalType> = {
TRACES: 'traces',
LOGS: 'logs',
METRICS: 'metrics',
} as const;
// ===================== Common Aggregation Expressions =====================
export const TRACE_AGGREGATIONS = {
COUNT: 'count()',
COUNT_DISTINCT_TRACE_ID: 'count_distinct(traceID)',
AVG_DURATION: 'avg(duration_nano)',
P50_DURATION: 'p50(duration_nano)',
P95_DURATION: 'p95(duration_nano)',
P99_DURATION: 'p99(duration_nano)',
MAX_DURATION: 'max(duration_nano)',
MIN_DURATION: 'min(duration_nano)',
SUM_DURATION: 'sum(duration_nano)',
} as const;
export const LOG_AGGREGATIONS = {
COUNT: 'count()',
COUNT_DISTINCT_HOST: 'count_distinct(host.name)',
COUNT_DISTINCT_SERVICE: 'count_distinct(service.name)',
COUNT_DISTINCT_CONTAINER: 'count_distinct(container.name)',
} as const;
// ===================== Common Filter Expressions =====================
export const COMMON_FILTERS = {
// Trace filters
SERVER_SPANS: "kind_string = 'Server'",
CLIENT_SPANS: "kind_string = 'Client'",
INTERNAL_SPANS: "kind_string = 'Internal'",
ERROR_SPANS: 'http.status_code >= 400',
SUCCESS_SPANS: 'http.status_code < 400',
// Common service filters
EXCLUDE_HEALTH_CHECKS: "http.route != '/health' AND http.route != '/ping'",
HTTP_REQUESTS: "http.method != ''",
// Log filters
ERROR_LOGS: "severity_text = 'ERROR'",
WARN_LOGS: "severity_text = 'WARN'",
INFO_LOGS: "severity_text = 'INFO'",
DEBUG_LOGS: "severity_text = 'DEBUG'",
} as const;
// ===================== Common Group By Fields =====================
export const COMMON_GROUP_BY_FIELDS = {
SERVICE_NAME: {
name: 'service.name',
fieldDataType: 'string' as const,
fieldContext: 'resource' as const,
},
HTTP_METHOD: {
name: 'http.method',
fieldDataType: 'string' as const,
fieldContext: 'attribute' as const,
},
HTTP_ROUTE: {
name: 'http.route',
fieldDataType: 'string' as const,
fieldContext: 'attribute' as const,
},
HTTP_STATUS_CODE: {
name: 'http.status_code',
fieldDataType: 'int64' as const,
fieldContext: 'attribute' as const,
},
HOST_NAME: {
name: 'host.name',
fieldDataType: 'string' as const,
fieldContext: 'resource' as const,
},
CONTAINER_NAME: {
name: 'container.name',
fieldDataType: 'string' as const,
fieldContext: 'resource' as const,
},
} as const;
// ===================== Function Names =====================
export const FUNCTION_NAMES: Record<string, FunctionName> = {
CUT_OFF_MIN: 'cutOffMin',
CUT_OFF_MAX: 'cutOffMax',
CLAMP_MIN: 'clampMin',
CLAMP_MAX: 'clampMax',
ABSOLUTE: 'absolute',
RUNNING_DIFF: 'runningDiff',
LOG2: 'log2',
LOG10: 'log10',
CUM_SUM: 'cumulativeSum',
EWMA3: 'ewma3',
EWMA5: 'ewma5',
EWMA7: 'ewma7',
MEDIAN3: 'median3',
MEDIAN5: 'median5',
MEDIAN7: 'median7',
TIME_SHIFT: 'timeShift',
ANOMALY: 'anomaly',
} as const;
// ===================== Common Step Intervals =====================
export const STEP_INTERVALS = {
FIFTEEN_SECONDS: '15s',
THIRTY_SECONDS: '30s',
ONE_MINUTE: '60s',
FIVE_MINUTES: '300s',
TEN_MINUTES: '600s',
FIFTEEN_MINUTES: '900s',
THIRTY_MINUTES: '1800s',
ONE_HOUR: '3600s',
TWO_HOURS: '7200s',
SIX_HOURS: '21600s',
TWELVE_HOURS: '43200s',
ONE_DAY: '86400s',
} as const;
// ===================== Time Range Presets =====================
export const TIME_RANGE_PRESETS = {
LAST_5_MINUTES: 5 * 60 * 1000,
LAST_15_MINUTES: 15 * 60 * 1000,
LAST_30_MINUTES: 30 * 60 * 1000,
LAST_HOUR: 60 * 60 * 1000,
LAST_3_HOURS: 3 * 60 * 60 * 1000,
LAST_6_HOURS: 6 * 60 * 60 * 1000,
LAST_12_HOURS: 12 * 60 * 60 * 1000,
LAST_24_HOURS: 24 * 60 * 60 * 1000,
LAST_3_DAYS: 3 * 24 * 60 * 60 * 1000,
LAST_7_DAYS: 7 * 24 * 60 * 60 * 1000,
} as const;

View File

@@ -48,3 +48,5 @@ export const getQueryRangeV5 = async (
ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);
}
};
export default getQueryRangeV5;

View File

@@ -10,7 +10,7 @@ import { QueryBuilderContextType } from 'types/common/queryBuilder';
import { AppLayer } from './types';
interface AppPageProvidersProps {
export interface AppPageProvidersProps {
children: ReactNode;
layout: AppLayer;
/** When set, replaces `QueryBuilderProvider` with a fixed context value. */

View File

@@ -11,7 +11,7 @@ import TimezoneProvider from 'providers/Timezone';
import { AppLayer } from './types';
interface AppProvidersProps {
export interface AppProvidersProps {
children: ReactNode;
store: Store;
queryClient: QueryClient;

View File

@@ -5,7 +5,7 @@ import { NotificationProvider } from 'hooks/useNotifications';
import { CmdKProvider } from 'providers/cmdKProvider';
import { ErrorModalProvider } from 'providers/ErrorModalProvider';
interface AppShellProps {
export interface AppShellProps {
children: ReactNode;
/** Mounted beside the routed content: the command palette and its siblings. */
overlays?: ReactNode;

View File

@@ -0,0 +1,39 @@
interface SeverityCriticalIconProps {
width?: number;
height?: number;
fill?: string;
stroke?: string;
}
function SeverityCriticalIcon({
width,
height,
fill,
stroke,
}: SeverityCriticalIconProps): JSX.Element {
return (
<svg
width={width}
height={height}
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M.99707.666056.99707 2.99939M.99707 5.33337H.991237M3.00293.666056 3.00293 2.99939M3.00293 5.33337H2.9971M5.00879.666056V2.99939M5.00879 5.33337H5.00296"
stroke={stroke}
strokeWidth="1.16667"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
SeverityCriticalIcon.defaultProps = {
width: 6,
height: 6,
fill: 'none',
stroke: '#F56C87',
};
export default SeverityCriticalIcon;

View File

@@ -0,0 +1,42 @@
interface SeverityErrorIconProps {
width?: number;
height?: number;
fill?: string;
stroke?: string;
strokeWidth?: string;
}
function SeverityErrorIcon({
width,
height,
fill,
stroke,
strokeWidth,
}: SeverityErrorIconProps): JSX.Element {
return (
<svg
width={width}
height={height}
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M1.00781.957845 1.00781 2.99951M1.00781 5.04175H1.00228"
stroke={stroke}
strokeWidth={strokeWidth}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
SeverityErrorIcon.defaultProps = {
width: 2,
height: 6,
fill: 'none',
stroke: '#F56C87',
strokeWidth: '1.02083',
};
export default SeverityErrorIcon;

View File

@@ -0,0 +1,46 @@
interface SeverityInfoIconProps {
width?: number;
height?: number;
fill?: string;
stroke?: string;
}
function SeverityInfoIcon({
width,
height,
fill,
stroke,
}: SeverityInfoIconProps): JSX.Element {
return (
<svg
width={width}
height={height}
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<rect
width={width}
height={height}
rx="3.5"
fill={stroke}
fillOpacity=".2"
/>
<path
d="M7 9.33346V7.00012M7 4.66675H7.00583"
stroke={stroke}
strokeWidth="1.16667"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
SeverityInfoIcon.defaultProps = {
width: 14,
height: 14,
fill: 'none',
stroke: '#7190F9',
};
export default SeverityInfoIcon;

View File

@@ -0,0 +1,42 @@
interface SeverityWarningIconProps {
width?: number;
height?: number;
fill?: string;
stroke?: string;
strokeWidth?: string;
}
function SeverityWarningIcon({
width,
height,
fill,
stroke,
strokeWidth,
}: SeverityWarningIconProps): JSX.Element {
return (
<svg
width={width}
height={height}
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M1.00732.957845 1.00732 2.99951M1.00732 5.04175H1.00179"
stroke={stroke}
strokeWidth={strokeWidth}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
SeverityWarningIcon.defaultProps = {
width: 2,
height: 6,
fill: 'none',
stroke: '#FFD778',
strokeWidth: '0.978299',
};
export default SeverityWarningIcon;

View File

@@ -0,0 +1,17 @@
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_d_2445_31698)">
<circle cx="23" cy="23" r="3" fill="#51E7A8"/>
</g>
<defs>
<filter id="filter0_d_2445_31698" x="0" y="0" width="46" height="46" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="10"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.317647 0 0 0 0 0.905882 0 0 0 0 0.658824 0 0 0 0.6 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2445_31698"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2445_31698" result="shape"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 910 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 204 KiB

View File

@@ -0,0 +1,458 @@
<svg
width="1348"
height="8"
viewBox="0 0 1348 8"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="2" height="2" rx="1" fill="#242834" />
<rect x="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="12" width="2" height="2" rx="1" fill="#242834" />
<rect x="18" width="2" height="2" rx="1" fill="#242834" />
<rect x="24" width="2" height="2" rx="1" fill="#242834" />
<rect x="30" width="2" height="2" rx="1" fill="#242834" />
<rect x="36" width="2" height="2" rx="1" fill="#242834" />
<rect x="42" width="2" height="2" rx="1" fill="#242834" />
<rect x="48" width="2" height="2" rx="1" fill="#242834" />
<rect x="54" width="2" height="2" rx="1" fill="#242834" />
<rect x="60" width="2" height="2" rx="1" fill="#242834" />
<rect x="66" width="2" height="2" rx="1" fill="#242834" />
<rect x="72" width="2" height="2" rx="1" fill="#242834" />
<rect x="78" width="2" height="2" rx="1" fill="#242834" />
<rect x="84" width="2" height="2" rx="1" fill="#242834" />
<rect x="90" width="2" height="2" rx="1" fill="#242834" />
<rect x="96" width="2" height="2" rx="1" fill="#242834" />
<rect x="102" width="2" height="2" rx="1" fill="#242834" />
<rect x="108" width="2" height="2" rx="1" fill="#242834" />
<rect x="114" width="2" height="2" rx="1" fill="#242834" />
<rect x="120" width="2" height="2" rx="1" fill="#242834" />
<rect x="126" width="2" height="2" rx="1" fill="#242834" />
<rect x="132" width="2" height="2" rx="1" fill="#242834" />
<rect x="138" width="2" height="2" rx="1" fill="#242834" />
<rect x="144" width="2" height="2" rx="1" fill="#242834" />
<rect x="150" width="2" height="2" rx="1" fill="#242834" />
<rect x="156" width="2" height="2" rx="1" fill="#242834" />
<rect x="162" width="2" height="2" rx="1" fill="#242834" />
<rect x="168" width="2" height="2" rx="1" fill="#242834" />
<rect x="174" width="2" height="2" rx="1" fill="#242834" />
<rect x="180" width="2" height="2" rx="1" fill="#242834" />
<rect x="186" width="2" height="2" rx="1" fill="#242834" />
<rect x="192" width="2" height="2" rx="1" fill="#242834" />
<rect x="198" width="2" height="2" rx="1" fill="#242834" />
<rect x="204" width="2" height="2" rx="1" fill="#242834" />
<rect x="210" width="2" height="2" rx="1" fill="#242834" />
<rect x="216" width="2" height="2" rx="1" fill="#242834" />
<rect x="222" width="2" height="2" rx="1" fill="#242834" />
<rect x="228" width="2" height="2" rx="1" fill="#242834" />
<rect x="234" width="2" height="2" rx="1" fill="#242834" />
<rect x="240" width="2" height="2" rx="1" fill="#242834" />
<rect x="246" width="2" height="2" rx="1" fill="#242834" />
<rect x="252" width="2" height="2" rx="1" fill="#242834" />
<rect x="258" width="2" height="2" rx="1" fill="#242834" />
<rect x="264" width="2" height="2" rx="1" fill="#242834" />
<rect x="270" width="2" height="2" rx="1" fill="#242834" />
<rect x="276" width="2" height="2" rx="1" fill="#242834" />
<rect x="282" width="2" height="2" rx="1" fill="#242834" />
<rect x="288" width="2" height="2" rx="1" fill="#242834" />
<rect x="294" width="2" height="2" rx="1" fill="#242834" />
<rect x="300" width="2" height="2" rx="1" fill="#242834" />
<rect x="306" width="2" height="2" rx="1" fill="#242834" />
<rect x="312" width="2" height="2" rx="1" fill="#242834" />
<rect x="318" width="2" height="2" rx="1" fill="#242834" />
<rect x="324" width="2" height="2" rx="1" fill="#242834" />
<rect x="330" width="2" height="2" rx="1" fill="#242834" />
<rect x="336" width="2" height="2" rx="1" fill="#242834" />
<rect x="342" width="2" height="2" rx="1" fill="#242834" />
<rect x="348" width="2" height="2" rx="1" fill="#242834" />
<rect x="354" width="2" height="2" rx="1" fill="#242834" />
<rect x="360" width="2" height="2" rx="1" fill="#242834" />
<rect x="366" width="2" height="2" rx="1" fill="#242834" />
<rect x="372" width="2" height="2" rx="1" fill="#242834" />
<rect x="378" width="2" height="2" rx="1" fill="#242834" />
<rect x="384" width="2" height="2" rx="1" fill="#242834" />
<rect x="390" width="2" height="2" rx="1" fill="#242834" />
<rect x="396" width="2" height="2" rx="1" fill="#242834" />
<rect x="402" width="2" height="2" rx="1" fill="#242834" />
<rect x="408" width="2" height="2" rx="1" fill="#242834" />
<rect x="414" width="2" height="2" rx="1" fill="#242834" />
<rect x="420" width="2" height="2" rx="1" fill="#242834" />
<rect x="426" width="2" height="2" rx="1" fill="#242834" />
<rect x="432" width="2" height="2" rx="1" fill="#242834" />
<rect x="438" width="2" height="2" rx="1" fill="#242834" />
<rect x="444" width="2" height="2" rx="1" fill="#242834" />
<rect x="450" width="2" height="2" rx="1" fill="#242834" />
<rect x="456" width="2" height="2" rx="1" fill="#242834" />
<rect x="462" width="2" height="2" rx="1" fill="#242834" />
<rect x="468" width="2" height="2" rx="1" fill="#242834" />
<rect x="474" width="2" height="2" rx="1" fill="#242834" />
<rect x="480" width="2" height="2" rx="1" fill="#242834" />
<rect x="486" width="2" height="2" rx="1" fill="#242834" />
<rect x="492" width="2" height="2" rx="1" fill="#242834" />
<rect x="498" width="2" height="2" rx="1" fill="#242834" />
<rect x="504" width="2" height="2" rx="1" fill="#242834" />
<rect x="510" width="2" height="2" rx="1" fill="#242834" />
<rect x="516" width="2" height="2" rx="1" fill="#242834" />
<rect x="522" width="2" height="2" rx="1" fill="#242834" />
<rect x="528" width="2" height="2" rx="1" fill="#242834" />
<rect x="534" width="2" height="2" rx="1" fill="#242834" />
<rect x="540" width="2" height="2" rx="1" fill="#242834" />
<rect x="546" width="2" height="2" rx="1" fill="#242834" />
<rect x="552" width="2" height="2" rx="1" fill="#242834" />
<rect x="558" width="2" height="2" rx="1" fill="#242834" />
<rect x="564" width="2" height="2" rx="1" fill="#242834" />
<rect x="570" width="2" height="2" rx="1" fill="#242834" />
<rect x="576" width="2" height="2" rx="1" fill="#242834" />
<rect x="582" width="2" height="2" rx="1" fill="#242834" />
<rect x="588" width="2" height="2" rx="1" fill="#242834" />
<rect x="594" width="2" height="2" rx="1" fill="#242834" />
<rect x="600" width="2" height="2" rx="1" fill="#242834" />
<rect x="606" width="2" height="2" rx="1" fill="#242834" />
<rect x="612" width="2" height="2" rx="1" fill="#242834" />
<rect x="618" width="2" height="2" rx="1" fill="#242834" />
<rect x="624" width="2" height="2" rx="1" fill="#242834" />
<rect x="630" width="2" height="2" rx="1" fill="#242834" />
<rect x="636" width="2" height="2" rx="1" fill="#242834" />
<rect x="642" width="2" height="2" rx="1" fill="#242834" />
<rect x="648" width="2" height="2" rx="1" fill="#242834" />
<rect x="654" width="2" height="2" rx="1" fill="#242834" />
<rect x="660" width="2" height="2" rx="1" fill="#242834" />
<rect x="666" width="2" height="2" rx="1" fill="#242834" />
<rect x="672" width="2" height="2" rx="1" fill="#242834" />
<rect x="678" width="2" height="2" rx="1" fill="#242834" />
<rect x="684" width="2" height="2" rx="1" fill="#242834" />
<rect x="690" width="2" height="2" rx="1" fill="#242834" />
<rect x="696" width="2" height="2" rx="1" fill="#242834" />
<rect x="702" width="2" height="2" rx="1" fill="#242834" />
<rect x="708" width="2" height="2" rx="1" fill="#242834" />
<rect x="714" width="2" height="2" rx="1" fill="#242834" />
<rect x="720" width="2" height="2" rx="1" fill="#242834" />
<rect x="726" width="2" height="2" rx="1" fill="#242834" />
<rect x="732" width="2" height="2" rx="1" fill="#242834" />
<rect x="738" width="2" height="2" rx="1" fill="#242834" />
<rect x="744" width="2" height="2" rx="1" fill="#242834" />
<rect x="750" width="2" height="2" rx="1" fill="#242834" />
<rect x="756" width="2" height="2" rx="1" fill="#242834" />
<rect x="762" width="2" height="2" rx="1" fill="#242834" />
<rect x="768" width="2" height="2" rx="1" fill="#242834" />
<rect x="774" width="2" height="2" rx="1" fill="#242834" />
<rect x="780" width="2" height="2" rx="1" fill="#242834" />
<rect x="786" width="2" height="2" rx="1" fill="#242834" />
<rect x="792" width="2" height="2" rx="1" fill="#242834" />
<rect x="798" width="2" height="2" rx="1" fill="#242834" />
<rect x="804" width="2" height="2" rx="1" fill="#242834" />
<rect x="810" width="2" height="2" rx="1" fill="#242834" />
<rect x="816" width="2" height="2" rx="1" fill="#242834" />
<rect x="822" width="2" height="2" rx="1" fill="#242834" />
<rect x="828" width="2" height="2" rx="1" fill="#242834" />
<rect x="834" width="2" height="2" rx="1" fill="#242834" />
<rect x="840" width="2" height="2" rx="1" fill="#242834" />
<rect x="846" width="2" height="2" rx="1" fill="#242834" />
<rect x="852" width="2" height="2" rx="1" fill="#242834" />
<rect x="858" width="2" height="2" rx="1" fill="#242834" />
<rect x="864" width="2" height="2" rx="1" fill="#242834" />
<rect x="870" width="2" height="2" rx="1" fill="#242834" />
<rect x="876" width="2" height="2" rx="1" fill="#242834" />
<rect x="882" width="2" height="2" rx="1" fill="#242834" />
<rect x="888" width="2" height="2" rx="1" fill="#242834" />
<rect x="894" width="2" height="2" rx="1" fill="#242834" />
<rect x="900" width="2" height="2" rx="1" fill="#242834" />
<rect x="906" width="2" height="2" rx="1" fill="#242834" />
<rect x="912" width="2" height="2" rx="1" fill="#242834" />
<rect x="918" width="2" height="2" rx="1" fill="#242834" />
<rect x="924" width="2" height="2" rx="1" fill="#242834" />
<rect x="930" width="2" height="2" rx="1" fill="#242834" />
<rect x="936" width="2" height="2" rx="1" fill="#242834" />
<rect x="942" width="2" height="2" rx="1" fill="#242834" />
<rect x="948" width="2" height="2" rx="1" fill="#242834" />
<rect x="954" width="2" height="2" rx="1" fill="#242834" />
<rect x="960" width="2" height="2" rx="1" fill="#242834" />
<rect x="966" width="2" height="2" rx="1" fill="#242834" />
<rect x="972" width="2" height="2" rx="1" fill="#242834" />
<rect x="978" width="2" height="2" rx="1" fill="#242834" />
<rect x="984" width="2" height="2" rx="1" fill="#242834" />
<rect x="990" width="2" height="2" rx="1" fill="#242834" />
<rect x="996" width="2" height="2" rx="1" fill="#242834" />
<rect x="1002" width="2" height="2" rx="1" fill="#242834" />
<rect x="1008" width="2" height="2" rx="1" fill="#242834" />
<rect x="1014" width="2" height="2" rx="1" fill="#242834" />
<rect x="1020" width="2" height="2" rx="1" fill="#242834" />
<rect x="1026" width="2" height="2" rx="1" fill="#242834" />
<rect x="1032" width="2" height="2" rx="1" fill="#242834" />
<rect x="1038" width="2" height="2" rx="1" fill="#242834" />
<rect x="1044" width="2" height="2" rx="1" fill="#242834" />
<rect x="1050" width="2" height="2" rx="1" fill="#242834" />
<rect x="1056" width="2" height="2" rx="1" fill="#242834" />
<rect x="1062" width="2" height="2" rx="1" fill="#242834" />
<rect x="1068" width="2" height="2" rx="1" fill="#242834" />
<rect x="1074" width="2" height="2" rx="1" fill="#242834" />
<rect x="1080" width="2" height="2" rx="1" fill="#242834" />
<rect x="1086" width="2" height="2" rx="1" fill="#242834" />
<rect x="1092" width="2" height="2" rx="1" fill="#242834" />
<rect x="1098" width="2" height="2" rx="1" fill="#242834" />
<rect x="1104" width="2" height="2" rx="1" fill="#242834" />
<rect x="1110" width="2" height="2" rx="1" fill="#242834" />
<rect x="1116" width="2" height="2" rx="1" fill="#242834" />
<rect x="1122" width="2" height="2" rx="1" fill="#242834" />
<rect x="1128" width="2" height="2" rx="1" fill="#242834" />
<rect x="1134" width="2" height="2" rx="1" fill="#242834" />
<rect x="1140" width="2" height="2" rx="1" fill="#242834" />
<rect x="1146" width="2" height="2" rx="1" fill="#242834" />
<rect x="1152" width="2" height="2" rx="1" fill="#242834" />
<rect x="1158" width="2" height="2" rx="1" fill="#242834" />
<rect x="1164" width="2" height="2" rx="1" fill="#242834" />
<rect x="1170" width="2" height="2" rx="1" fill="#242834" />
<rect x="1176" width="2" height="2" rx="1" fill="#242834" />
<rect x="1182" width="2" height="2" rx="1" fill="#242834" />
<rect x="1188" width="2" height="2" rx="1" fill="#242834" />
<rect x="1194" width="2" height="2" rx="1" fill="#242834" />
<rect x="1200" width="2" height="2" rx="1" fill="#242834" />
<rect x="1206" width="2" height="2" rx="1" fill="#242834" />
<rect x="1212" width="2" height="2" rx="1" fill="#242834" />
<rect x="1218" width="2" height="2" rx="1" fill="#242834" />
<rect x="1224" width="2" height="2" rx="1" fill="#242834" />
<rect x="1230" width="2" height="2" rx="1" fill="#242834" />
<rect x="1236" width="2" height="2" rx="1" fill="#242834" />
<rect x="1242" width="2" height="2" rx="1" fill="#242834" />
<rect x="1248" width="2" height="2" rx="1" fill="#242834" />
<rect x="1254" width="2" height="2" rx="1" fill="#242834" />
<rect x="1260" width="2" height="2" rx="1" fill="#242834" />
<rect x="1266" width="2" height="2" rx="1" fill="#242834" />
<rect x="1272" width="2" height="2" rx="1" fill="#242834" />
<rect x="1278" width="2" height="2" rx="1" fill="#242834" />
<rect x="1284" width="2" height="2" rx="1" fill="#242834" />
<rect x="1290" width="2" height="2" rx="1" fill="#242834" />
<rect x="1296" width="2" height="2" rx="1" fill="#242834" />
<rect x="1302" width="2" height="2" rx="1" fill="#242834" />
<rect x="1308" width="2" height="2" rx="1" fill="#242834" />
<rect x="1314" width="2" height="2" rx="1" fill="#242834" />
<rect x="1320" width="2" height="2" rx="1" fill="#242834" />
<rect x="1326" width="2" height="2" rx="1" fill="#242834" />
<rect x="1332" width="2" height="2" rx="1" fill="#242834" />
<rect x="1338" width="2" height="2" rx="1" fill="#242834" />
<rect x="1344" width="2" height="2" rx="1" fill="#242834" />
<rect y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="6" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="12" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="18" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="24" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="30" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="36" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="42" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="48" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="54" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="60" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="66" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="72" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="78" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="84" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="90" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="96" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="102" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="108" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="114" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="120" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="126" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="132" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="138" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="144" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="150" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="156" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="162" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="168" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="174" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="180" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="186" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="192" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="198" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="204" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="210" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="216" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="222" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="228" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="234" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="240" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="246" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="252" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="258" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="264" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="270" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="276" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="282" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="288" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="294" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="300" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="306" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="312" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="318" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="324" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="330" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="336" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="342" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="348" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="354" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="360" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="366" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="372" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="378" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="384" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="390" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="396" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="402" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="408" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="414" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="420" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="426" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="432" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="438" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="444" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="450" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="456" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="462" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="468" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="474" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="480" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="486" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="492" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="498" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="504" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="510" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="516" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="522" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="528" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="534" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="540" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="546" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="552" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="558" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="564" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="570" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="576" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="582" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="588" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="594" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="600" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="606" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="612" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="618" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="624" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="630" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="636" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="642" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="648" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="654" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="660" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="666" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="672" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="678" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="684" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="690" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="696" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="702" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="708" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="714" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="720" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="726" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="732" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="738" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="744" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="750" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="756" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="762" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="768" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="774" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="780" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="786" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="792" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="798" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="804" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="810" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="816" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="822" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="828" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="834" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="840" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="846" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="852" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="858" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="864" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="870" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="876" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="882" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="888" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="894" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="900" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="906" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="912" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="918" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="924" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="930" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="936" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="942" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="948" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="954" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="960" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="966" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="972" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="978" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="984" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="990" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="996" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1002" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1008" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1014" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1020" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1026" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1032" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1038" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1044" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1050" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1056" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1062" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1068" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1074" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1080" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1086" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1092" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1098" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1104" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1110" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1116" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1122" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1128" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1134" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1140" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1146" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1152" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1158" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1164" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1170" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1176" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1182" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1188" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1194" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1200" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1206" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1212" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1218" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1224" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1230" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1236" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1242" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1248" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1254" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1260" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1266" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1272" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1278" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1284" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1290" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1296" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1302" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1308" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1314" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1320" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1326" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1332" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1338" y="6" width="2" height="2" rx="1" fill="#242834" />
<rect x="1344" y="6" width="2" height="2" rx="1" fill="#242834" />
</svg>

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 565.65 130.02"><defs><style>.cls-1{fill:#17181a;}.cls-2{fill:#f15931;}.cls-3{fill:#f9f2f8;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M157.17,97.54q-7.86-7.79-7.85-21.71h17.22q0,6.58,3.35,10.32t9.31,3.73h14.06a15.93,15.93,0,0,0,9.05-2.34,7.22,7.22,0,0,0,3.48-6.27V77q0-6.21-9.12-7.73l-23.29-3.92Q162,63.42,156.09,58A17.81,17.81,0,0,1,150.2,44.3V37.21a20.09,20.09,0,0,1,3.61-11.84,23.11,23.11,0,0,1,10.26-7.92,39.67,39.67,0,0,1,15.38-2.78h14.31a30.14,30.14,0,0,1,14.56,3.42,24.37,24.37,0,0,1,9.82,9.56,28.37,28.37,0,0,1,3.48,14.24H204.4a12.27,12.27,0,0,0-2.92-8.55,9.89,9.89,0,0,0-7.72-3.22H179.45a14.51,14.51,0,0,0-8.54,2.28,7.05,7.05,0,0,0-3.23,6.07v3.42q0,6.33,8.73,7.85l23.18,4q11.52,2,17.6,7.16a16.52,16.52,0,0,1,6.07,13.23v8.36a19.86,19.86,0,0,1-3.73,11.9,24.08,24.08,0,0,1-10.45,8,39.54,39.54,0,0,1-15.57,2.85H179Q165,105.33,157.17,97.54Z"/><path class="cls-1" d="M237.89,32.33a9.93,9.93,0,0,1-3-7.53,10,10,0,0,1,3-7.54,12.42,12.42,0,0,1,15.83,0,10,10,0,0,1,3,7.54,10,10,0,0,1-3,7.53,12.42,12.42,0,0,1-15.83,0Zm-.7,8.8h17.22v63.19H237.19Z"/><path class="cls-1" d="M279.1,124.26a21.43,21.43,0,0,1-7.47-15.13h17a6.41,6.41,0,0,0,2.28,4.49,7.58,7.58,0,0,0,5.06,1.71h11.4a7.65,7.65,0,0,0,6.39-3.23,13.46,13.46,0,0,0,2.47-8.42v-6a18.47,18.47,0,0,1-6.14,4.43,16.59,16.59,0,0,1-6.9,1.65h-8.74q-11.52,0-18.55-6.84t-7-18V66.08a27.41,27.41,0,0,1,3.3-13.62,22.83,22.83,0,0,1,9.24-9.11,28.27,28.27,0,0,1,13.68-3.23h7.34a18.87,18.87,0,0,1,8.42,2,18.64,18.64,0,0,1,6.65,5.31V41.13h15.95v62.55a28.43,28.43,0,0,1-3.23,13.81,22.81,22.81,0,0,1-9.18,9.24A27.79,27.79,0,0,1,307.34,130h-11.4Q285.82,130,279.1,124.26Zm25.2-35a10.11,10.11,0,0,0,8.1-4,18.2,18.2,0,0,0,3.8-10.45V66.08A13.26,13.26,0,0,0,312.78,58a9.76,9.76,0,0,0-7.34-3h-8.86a9.5,9.5,0,0,0-7.6,3.42,13.4,13.4,0,0,0-2.91,9V77.73a12.55,12.55,0,0,0,2.65,8.35,8.55,8.55,0,0,0,6.84,3.17Z"/><path class="cls-1" d="M348.62,15.68h15.57L406.73,76V15.68h17.1v88.64H408.26L365.71,44v60.28H348.62Z"/><path class="cls-1" d="M449.34,102.23a22.51,22.51,0,0,1-9.49-8.8,25.45,25.45,0,0,1-3.36-13.17V65.44a25.42,25.42,0,0,1,3.42-13.23,23.29,23.29,0,0,1,9.56-8.93,30.5,30.5,0,0,1,14.12-3.16H475a30.5,30.5,0,0,1,14.12,3.16,23.35,23.35,0,0,1,9.56,8.93,25.42,25.42,0,0,1,3.42,13.23V80.26a25.1,25.1,0,0,1-3.42,13.17,23,23,0,0,1-9.56,8.8,31.14,31.14,0,0,1-14.24,3.1h-11.4A30.86,30.86,0,0,1,449.34,102.23ZM474.6,90.52a9.37,9.37,0,0,0,7.47-3.23,12.43,12.43,0,0,0,2.79-8.42V66.58a12.43,12.43,0,0,0-2.79-8.42,9.21,9.21,0,0,0-7.34-3.23H463.84a9.21,9.21,0,0,0-7.34,3.23,12.43,12.43,0,0,0-2.79,8.42V78.87a12.43,12.43,0,0,0,2.79,8.42,9.08,9.08,0,0,0,7.21,3.23Z"/><path class="cls-1" d="M506.89,95.71l34.19-40H508.41V41.13h57.24v8.61l-34.19,40H565v14.56H506.89Z"/><path class="cls-2" d="M61.1,119.86C27.16,119.86,0,93.22,0,59.93,0,27,27.16,0,61.1,0H99.46a22.17,22.17,0,0,1,22.4,22v38C121.86,93.22,94.71,119.86,61.1,119.86Z"/><path class="cls-3" d="M60.62,34C35.27,34,21,55,20.39,55.87a6.53,6.53,0,0,0,0,7.26C21,64,35.27,85,60.62,85s39.64-21,40.23-21.89a6.51,6.51,0,0,0,0-7.25C100.26,55,86,34,60.62,34ZM23.9,60.79a2.33,2.33,0,0,1,0-2.58c.48-.72,10.65-15.65,28.83-19.24a22,22,0,0,0,0,41.05C34.55,76.44,24.38,61.5,23.9,60.79ZM50.49,59.5a2.11,2.11,0,0,1-4.22,0A14.36,14.36,0,0,1,60.62,45.15a2.11,2.11,0,1,1,0,4.21A10.14,10.14,0,0,0,50.49,59.5Zm10.13,5.13a5.13,5.13,0,1,1,5.13-5.13A5.13,5.13,0,0,1,60.62,64.63Zm36.72-3.84C96.86,61.5,86.7,76.44,68.52,80a22,22,0,0,0,0-41C86.7,42.56,96.86,57.49,97.34,58.21A2.29,2.29,0,0,1,97.34,60.79Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 565.65 130.02"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#f15931;}.cls-3{fill:#f9f2f8;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M157.17,97.54q-7.86-7.79-7.85-21.71h17.22q0,6.58,3.35,10.32t9.31,3.73h14.06a15.93,15.93,0,0,0,9.05-2.34,7.22,7.22,0,0,0,3.48-6.27V77q0-6.21-9.12-7.73l-23.29-3.92Q162,63.42,156.09,58A17.81,17.81,0,0,1,150.2,44.3V37.21a20.09,20.09,0,0,1,3.61-11.84,23.11,23.11,0,0,1,10.26-7.92,39.67,39.67,0,0,1,15.38-2.78h14.31a30.14,30.14,0,0,1,14.56,3.42,24.37,24.37,0,0,1,9.82,9.56,28.37,28.37,0,0,1,3.48,14.24H204.4a12.27,12.27,0,0,0-2.92-8.55,9.89,9.89,0,0,0-7.72-3.22H179.45a14.51,14.51,0,0,0-8.54,2.28,7.05,7.05,0,0,0-3.23,6.07v3.42q0,6.33,8.73,7.85l23.18,4q11.52,2,17.6,7.16a16.52,16.52,0,0,1,6.07,13.23v8.36a19.86,19.86,0,0,1-3.73,11.9,24.08,24.08,0,0,1-10.45,8,39.54,39.54,0,0,1-15.57,2.85H179Q165,105.33,157.17,97.54Z"/><path class="cls-1" d="M237.89,32.33a9.93,9.93,0,0,1-3-7.53,10,10,0,0,1,3-7.54,12.42,12.42,0,0,1,15.83,0,10,10,0,0,1,3,7.54,10,10,0,0,1-3,7.53,12.42,12.42,0,0,1-15.83,0Zm-.7,8.8h17.22v63.19H237.19Z"/><path class="cls-1" d="M279.1,124.26a21.43,21.43,0,0,1-7.47-15.13h17a6.41,6.41,0,0,0,2.28,4.49,7.58,7.58,0,0,0,5.06,1.71h11.4a7.65,7.65,0,0,0,6.39-3.23,13.46,13.46,0,0,0,2.47-8.42v-6a18.47,18.47,0,0,1-6.14,4.43,16.59,16.59,0,0,1-6.9,1.65h-8.74q-11.52,0-18.55-6.84t-7-18V66.08a27.41,27.41,0,0,1,3.3-13.62,22.83,22.83,0,0,1,9.24-9.11,28.27,28.27,0,0,1,13.68-3.23h7.34a18.87,18.87,0,0,1,8.42,2,18.64,18.64,0,0,1,6.65,5.31V41.13h15.95v62.55a28.43,28.43,0,0,1-3.23,13.81,22.81,22.81,0,0,1-9.18,9.24A27.79,27.79,0,0,1,307.34,130h-11.4Q285.82,130,279.1,124.26Zm25.2-35a10.11,10.11,0,0,0,8.1-4,18.2,18.2,0,0,0,3.8-10.45V66.08A13.26,13.26,0,0,0,312.78,58a9.76,9.76,0,0,0-7.34-3h-8.86a9.5,9.5,0,0,0-7.6,3.42,13.4,13.4,0,0,0-2.91,9V77.73a12.55,12.55,0,0,0,2.65,8.35,8.55,8.55,0,0,0,6.84,3.17Z"/><path class="cls-1" d="M348.62,15.68h15.57L406.73,76V15.68h17.1v88.64H408.26L365.71,44v60.28H348.62Z"/><path class="cls-1" d="M449.34,102.23a22.51,22.51,0,0,1-9.49-8.8,25.45,25.45,0,0,1-3.36-13.17V65.44a25.42,25.42,0,0,1,3.42-13.23,23.29,23.29,0,0,1,9.56-8.93,30.5,30.5,0,0,1,14.12-3.16H475a30.5,30.5,0,0,1,14.12,3.16,23.35,23.35,0,0,1,9.56,8.93,25.42,25.42,0,0,1,3.42,13.23V80.26a25.1,25.1,0,0,1-3.42,13.17,23,23,0,0,1-9.56,8.8,31.14,31.14,0,0,1-14.24,3.1h-11.4A30.86,30.86,0,0,1,449.34,102.23ZM474.6,90.52a9.37,9.37,0,0,0,7.47-3.23,12.43,12.43,0,0,0,2.79-8.42V66.58a12.43,12.43,0,0,0-2.79-8.42,9.21,9.21,0,0,0-7.34-3.23H463.84a9.21,9.21,0,0,0-7.34,3.23,12.43,12.43,0,0,0-2.79,8.42V78.87a12.43,12.43,0,0,0,2.79,8.42,9.08,9.08,0,0,0,7.21,3.23Z"/><path class="cls-1" d="M506.89,95.71l34.19-40H508.41V41.13h57.24v8.61l-34.19,40H565v14.56H506.89Z"/><path class="cls-2" d="M61.1,119.86C27.16,119.86,0,93.22,0,59.93,0,27,27.16,0,61.1,0H99.46a22.17,22.17,0,0,1,22.4,22v38C121.86,93.22,94.71,119.86,61.1,119.86Z"/><path class="cls-3" d="M60.62,34C35.27,34,21,55,20.39,55.87a6.53,6.53,0,0,0,0,7.26C21,64,35.27,85,60.62,85s39.64-21,40.23-21.89a6.51,6.51,0,0,0,0-7.25C100.26,55,86,34,60.62,34ZM23.9,60.79a2.33,2.33,0,0,1,0-2.58c.48-.72,10.65-15.65,28.83-19.24a22,22,0,0,0,0,41.05C34.55,76.44,24.38,61.5,23.9,60.79ZM50.49,59.5a2.11,2.11,0,0,1-4.22,0A14.36,14.36,0,0,1,60.62,45.15a2.11,2.11,0,1,1,0,4.21A10.14,10.14,0,0,0,50.49,59.5Zm10.13,5.13a5.13,5.13,0,1,1,5.13-5.13A5.13,5.13,0,0,1,60.62,64.63Zm36.72-3.84C96.86,61.5,86.7,76.44,68.52,80a22,22,0,0,0,0-41C86.7,42.56,96.86,57.49,97.34,58.21A2.29,2.29,0,0,1,97.34,60.79Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

View File

@@ -4,7 +4,7 @@ import { Divider } from '@signozhq/ui/divider';
import styles from './AlertBreadcrumb.module.scss';
import BreadcrumbItem, { BreadcrumbItemConfig } from './BreadcrumbItem';
interface AlertBreadcrumbProps {
export interface AlertBreadcrumbProps {
items: BreadcrumbItemConfig[];
className?: string;
showDivider?: boolean;

View File

@@ -1 +1,6 @@
export { default } from './AlertBreadcrumb';
export {
default as BreadcrumbItem,
type BreadcrumbItemConfig,
} from './BreadcrumbItem';
export type { AlertBreadcrumbProps } from './AlertBreadcrumb';

View File

@@ -29,6 +29,33 @@
min-width: 0;
}
.overflowTrigger {
all: unset;
cursor: pointer;
}
.labelPopover {
display: flex;
flex-direction: column;
gap: 6px;
padding: 8px;
max-height: 300px;
overflow-y: auto;
}
.labelTooltip {
display: flex;
flex-direction: column;
gap: 6px;
max-height: 300px;
overflow-y: auto;
}
.labelValue {
text-overflow: ellipsis;
overflow: hidden;
}
.tooltipContent {
display: flex;
align-items: center;

View File

@@ -1,4 +1,4 @@
import { act, render, screen } from '@testing-library/react';
import { act, render, screen } from 'tests/test-utils';
import LabelColumn from './LabelColumn';
@@ -92,7 +92,9 @@ describe('LabelColumn', () => {
renderWithProviders(<LabelColumn labels={labels} />);
const isHidden = (label: string): boolean =>
screen.getByTestId(`label-tag-${label}`).closest('.overflowed') !== null;
screen
.getByTestId(`label-tag-container-${label}`)
.classList.contains('overflowed');
expect(labels.filter(isHidden)).toStrictEqual(['team', 'owner', 'version']);
expect(screen.getByTestId('label-overflow-badge')).toHaveTextContent('+3');
@@ -157,8 +159,7 @@ describe('LabelColumn', () => {
it('should render empty when no labels provided', () => {
renderWithProviders(<LabelColumn labels={[]} />);
const column = screen.getByTestId('label-column');
expect(column.children).toHaveLength(0);
expect(screen.getByTestId('label-column')).toBeEmptyDOMElement();
});
it('should use primary color by default', () => {

View File

@@ -11,7 +11,7 @@ import LabelTag from './LabelTag';
import styles from './LabelColumn.module.scss';
import { getVisibleCount } from './utils';
interface LabelColumnProps {
export interface LabelColumnProps {
labels: string[];
color?: BadgeColorType;
value?: { [key: string]: string };

View File

@@ -6,7 +6,7 @@ import { useCopyToClipboard } from 'react-use';
import styles from './LabelTag.module.scss';
interface LabelTagProps {
export interface LabelTagProps {
label: string;
color?: BadgeColorType;
value?: string;
@@ -45,7 +45,7 @@ function LabelTag({
</div>
}
>
<span className={className}>
<span className={className} data-testid={`label-tag-container-${label}`}>
<Badge
textTransform="none"
color={color ?? 'secondary'}

View File

@@ -1 +1,2 @@
export { default } from './LabelColumn';
export type { LabelColumnProps } from './LabelColumn';

View File

@@ -1,4 +1,4 @@
const OVERFLOW_BADGE_WIDTH = 40;
export const OVERFLOW_BADGE_WIDTH = 40;
/**
* How many leading labels fit in `available` px, reserving room for the `+N` badge

View File

@@ -1,5 +1,29 @@
import type { BadgeColorType } from '@signozhq/ui/badge';
export const STATE_ORDER = ['firing', 'pending', 'inactive', 'disabled'];
export const SEVERITY_ORDER = ['critical', 'error', 'warning', 'info'];
export const STATE_LABELS: Record<string, string> = {
firing: 'Firing',
pending: 'Pending',
inactive: 'OK',
disabled: 'Disabled',
};
export const STATE_COLORS: Record<string, string> = {
firing: 'var(--bg-cherry-500)',
pending: 'var(--bg-amber-500)',
inactive: 'var(--bg-forest-500)',
disabled: 'var(--l2-foreground)',
};
export const SEVERITY_COLORS: Record<string, string> = {
critical: 'var(--bg-cherry-500)',
error: 'var(--bg-cherry-400)',
warning: 'var(--bg-amber-500)',
info: 'var(--bg-robin-500)',
};
export const SEVERITY_BADGE_COLORS: Record<string, BadgeColorType> = {
critical: 'danger',
error: 'danger',

View File

@@ -33,6 +33,10 @@
.brand-tagline {
margin-bottom: 24px;
.ant-typography {
color: var(--l2-foreground); // Secondary text
}
}
/* HTML: <div class="loader"></div> */

View File

@@ -22,7 +22,10 @@ function AppLoading(): JSX.Element {
const isDarkMode = getThemeFromStorage();
return (
<div className={`app-loading-container ${isDarkMode ? 'dark' : 'lightMode'}`}>
<div
className={`app-loading-container ${isDarkMode ? 'dark' : 'lightMode'}`}
data-testid="app-loading-container"
>
<div className="perilin-bg" />
<div className="app-loading-content">
<div className="brand">
@@ -53,7 +56,7 @@ function AppLoading(): JSX.Element {
</Typography>
</div>
<div className="loader" />
<div className="loader" data-testid="app-loading-loader" />
</div>
</div>
);

View File

@@ -1,4 +1,5 @@
import { render, screen } from '@testing-library/react';
import { render } from '@testing-library/react';
import { screen } from 'tests/test-utils';
import getLocal from '../../../api/browser/localstorage/get';
import AppLoading from '../AppLoading';
@@ -15,7 +16,6 @@ describe('AppLoading', () => {
const SIGNOZ_TEXT = 'SigNoz';
const TAGLINE_TEXT =
'OpenTelemetry-Native Logs, Metrics and Traces in a single pane';
const CONTAINER_SELECTOR = '.app-loading-container';
beforeEach(() => {
jest.clearAllMocks();
@@ -33,7 +33,7 @@ describe('AppLoading', () => {
expect(screen.getByText(TAGLINE_TEXT)).toBeInTheDocument();
// Check if dark theme class is applied
const container = screen.getByText(SIGNOZ_TEXT).closest(CONTAINER_SELECTOR);
const container = screen.getByTestId('app-loading-container');
expect(container).toHaveClass('dark');
expect(container).not.toHaveClass('lightMode');
});
@@ -58,7 +58,7 @@ describe('AppLoading', () => {
expect(tagline).toBeInTheDocument();
// Check for loader
const loader = document.querySelector('.loader');
const loader = screen.getByTestId('app-loading-loader');
expect(loader).toBeInTheDocument();
});
@@ -72,7 +72,7 @@ describe('AppLoading', () => {
// Should still render with dark theme as fallback
expect(screen.getByText(SIGNOZ_TEXT)).toBeInTheDocument();
const container = screen.getByText(SIGNOZ_TEXT).closest(CONTAINER_SELECTOR);
const container = screen.getByTestId('app-loading-container');
expect(container).toHaveClass('dark');
});
});

View File

@@ -3,7 +3,7 @@ import { Toaster } from '@signozhq/ui/toast';
const PAGE_INSET = { bottom: 'var(--bottom-strip-height, 0px)' };
function AppToaster(): JSX.Element {
return <Toaster position="bottom-right" pageInset={PAGE_INSET} />;
return <Toaster position="top-right" pageInset={PAGE_INSET} />;
}
export default AppToaster;

View File

@@ -7,7 +7,7 @@ import { isModifierKeyPressed } from 'utils/app';
import styles from './BackHeader.module.scss';
interface BackHeaderProps {
export interface BackHeaderProps {
/** Where the page came from, named as the place rather than the action. */
backLabel: string;
backRoute: string;

View File

@@ -57,5 +57,9 @@
.ant-drawer-footer {
border-top: 1px solid var(--l1-border);
.footer-text {
color: var(--l2-foreground);
}
}
}

View File

@@ -18,7 +18,7 @@ import { useNavigateToExplorer } from '../useNavigateToExplorer';
import './CeleryTaskDetail.style.scss';
type CeleryTaskData = {
export type CeleryTaskData = {
entity: string;
value: string | number;
timeRange: [number, number];

View File

@@ -141,6 +141,10 @@
border-radius: 4px;
padding: 6px 24px 6px 12px;
width: max-content;
.configure-option-Info-text {
color: var(--l2-foreground);
}
}
.row-panel {
@@ -153,6 +157,11 @@
height: 48px !important;
width: 100%;
.ant-typography {
font-size: 14px;
font-weight: 500;
}
.row-panel-section {
display: flex;
gap: 6px;

View File

@@ -41,7 +41,7 @@ interface TabData {
key: string;
}
enum CeleryTaskGraphState {
export enum CeleryTaskGraphState {
P99 = 'p99',
P95 = 'p95',
P90 = 'p90',

View File

@@ -0,0 +1,25 @@
.scrollHint {
position: sticky;
bottom: 0;
height: 0;
}
.scrollButton {
position: absolute;
bottom: var(--spacing-7);
left: 50%;
transform: translateX(-50%);
}
.scrollIcon {
animation: pulse 1s infinite;
}
@keyframes pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}

View File

@@ -1,129 +0,0 @@
.changelog-modal {
.ant-modal-content {
padding: unset;
background-color: var(--l2-background);
.ant-modal-header {
margin-bottom: unset;
}
.ant-modal-footer {
margin-top: unset;
}
}
&-title {
display: flex;
align-items: center;
gap: 8px;
background-color: var(--l2-background);
padding: 16px;
font-size: 14px;
line-height: 20px;
color: var(--l1-foreground);
border-bottom: 1px solid var(--l1-border);
}
&-footer.scroll-available {
.scroll-btn-container {
display: block;
}
}
&-footer {
position: relative;
border: 1px solid var(--l1-border);
padding: 12px;
display: flex;
align-items: center;
justify-content: space-between;
&-label {
color: var(--text-robin-400);
font-size: 14px;
line-height: 24px;
position: relative;
padding-left: 14px;
&::before {
content: '';
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
width: 6px;
height: 6px;
border-radius: 100%;
background-color: var(--primary-background);
}
}
&-ctas {
display: flex;
margin-left: auto;
& svg {
font-size: 14px;
}
}
.scroll-btn-container {
display: none;
position: absolute;
top: -40px;
left: 50%;
transform: translateX(-50%);
.scroll-btn {
all: unset;
padding: 4px 12px 4px 10px;
background-color: var(--l1-border);
border-radius: 20px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
transition: background-color 0.1s;
&:hover {
background-color: var(--l1-border);
}
&:active {
background-color: var(--l1-border);
}
span {
font-size: 12px;
line-height: 18px;
color: var(--l2-foreground);
}
// add animation to the chevrons down icon
svg {
animation: pulse 1s infinite;
}
}
}
}
&-content {
max-height: calc(100vh - 300px);
overflow-y: auto;
padding: 16px 16px 18px 16px;
border: 1px solid var(--l1-border);
border-top-width: 0;
border-bottom-width: 0;
}
}
// pulse for the scroll for more icon
@keyframes pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}

View File

@@ -1,10 +1,9 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { useEffect } from 'react';
import { useMutation } from 'react-query';
import { Check, ChevronsDown, ScrollText, X } from '@signozhq/icons';
import { Button, Modal } from 'antd';
import Flex from 'periscope/components/Flex/Flex';
import { Button } from '@signozhq/ui/button';
import { Dialog } from '@signozhq/ui/dialog';
import updateUserPreference from 'api/v1/user/preferences/name/update';
import cx from 'classnames';
import { USER_PREFERENCES } from 'constants/userPreferences';
import dayjs from 'dayjs';
import { useGetTenantLicense } from 'hooks/useGetTenantLicense';
@@ -13,8 +12,9 @@ import { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';
import { UserPreference } from 'types/api/preferences/preference';
import ChangelogRenderer from './components/ChangelogRenderer';
import { useChangelogScroll } from './useChangelogScroll';
import './ChangelogModal.styles.scss';
import styles from './ChangelogModal.module.scss';
interface Props {
changelog: ChangelogSchema;
@@ -22,8 +22,7 @@ interface Props {
}
function ChangelogModal({ changelog, onClose }: Props): JSX.Element {
const [hasScroll, setHasScroll] = useState(false);
const changelogContentSectionRef = useRef<HTMLDivElement>(null);
const { contentRef, hasScroll, scrollForMore } = useChangelogScroll();
const { userPreferences, updateUserPreferenceInContext } = useAppContext();
const formattedReleaseDate = dayjs(changelog?.release_date).format(
@@ -57,30 +56,6 @@ function ChangelogModal({ changelog, onClose }: Props): JSX.Element {
updateUserPreferenceInContext,
]);
const checkScroll = useCallback((): void => {
if (changelogContentSectionRef.current) {
const { scrollHeight, clientHeight, scrollTop } =
changelogContentSectionRef.current;
const isAtBottom = scrollHeight - clientHeight - scrollTop <= 8;
setHasScroll(scrollHeight > clientHeight + 24 && !isAtBottom); // 24px - buffer height to show show more
}
}, []);
useEffect(() => {
checkScroll();
const changelogContentSection = changelogContentSectionRef.current;
if (changelogContentSection) {
changelogContentSection.addEventListener('scroll', checkScroll);
}
return (): void => {
if (changelogContentSection) {
changelogContentSection.removeEventListener('scroll', checkScroll);
}
};
}, [checkScroll]);
const onClickUpdateWorkspace = (): void => {
window.open(
'https://signoz.io/upgrade-path',
@@ -89,75 +64,61 @@ function ChangelogModal({ changelog, onClose }: Props): JSX.Element {
);
};
const onClickScrollForMore = (): void => {
if (changelogContentSectionRef.current) {
changelogContentSectionRef.current.scrollTo({
top: changelogContentSectionRef.current.scrollTop + 600, // Scroll 600px from the current position
behavior: 'smooth',
});
}
};
// TODO: antd stacks at 1000, under `@signozhq/ui` dialogs (1001). It opens on
// its own a second after load, so a dialog opened from a deep link
// (`?add-key`, `?invite=true`) covers it. Moving to the `@signozhq/ui` Dialog
// fixes it.
return (
<Modal
className={cx('changelog-modal')}
title={
<div className="changelog-modal-title">
<ScrollText size={16} />
What’s New ⎯ Changelog : {formattedReleaseDate}
</div>
}
width={820}
<Dialog
open
onCancel={onClose}
footer={
<div
className={cx('changelog-modal-footer', hasScroll && 'scroll-available')}
>
{!isCloudUser && (
<div className="changelog-modal-footer-ctas">
<Button type="default" onClick={onClose}>
<Flex align="center" gap="4px">
<X size="md" />
Skip for now
</Flex>
</Button>
<Button type="primary" onClick={onClickUpdateWorkspace}>
<Flex align="center" gap="4px">
<Check size="md" />
Update my workspace
</Flex>
</Button>
</div>
)}
{changelog && (
<div className="scroll-btn-container">
<button
data-testid="scroll-more-btn"
type="button"
className="scroll-btn"
onClick={onClickScrollForMore}
>
<ChevronsDown size={14} />
<span>Scroll for more</span>
</button>
</div>
)}
</div>
onClose={onClose}
title={`What’s New ⎯ Changelog : ${formattedReleaseDate}`}
titleIcon={<ScrollText size={16} />}
width="extra-wide"
testId="changelog-dialog"
footerSuffix={
isCloudUser ? undefined : (
<>
<Button
variant="outlined"
color="secondary"
size="md"
prefix={<X size={12} />}
onClick={onClose}
testId="changelog-skip-btn"
>
Skip for now
</Button>
<Button
variant="solid"
color="primary"
size="md"
prefix={<Check size={12} />}
onClick={onClickUpdateWorkspace}
testId="changelog-update-btn"
>
Update my workspace
</Button>
</>
)
}
>
<div
className="changelog-modal-content"
data-testid="changelog-content"
ref={changelogContentSectionRef}
>
{changelog && <ChangelogRenderer changelog={changelog} />}
<div data-testid="changelog-content" ref={contentRef}>
<ChangelogRenderer changelog={changelog} />
</div>
</Modal>
{hasScroll && (
<div className={styles.scrollHint}>
<div className={styles.scrollButton}>
<Button
variant="solid"
color="primary"
size="sm"
prefix={<ChevronsDown size={14} className={styles.scrollIcon} />}
onClick={scrollForMore}
testId="scroll-more-btn"
>
Scroll for more
</Button>
</div>
</div>
)}
</Dialog>
);
}

View File

@@ -1,12 +1,23 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { fireEvent, render, screen } from '@testing-library/react';
import { ReactNode } from 'react';
import { USER_PREFERENCES } from 'constants/userPreferences';
import MockQueryClientProvider from 'providers/test/MockQueryClientProvider';
import { IAppContext } from 'providers/App/types';
import {
fireEvent,
getAppContextMock,
render,
screen,
userEvent,
waitFor,
} from 'tests/test-utils';
import {
ChangelogSchema,
DeploymentType,
} from 'types/api/changelog/getChangelogByVersion';
import {
LicensePlatform,
LicenseResModel,
} from 'types/api/licensesV3/getActive';
import { UserPreference } from 'types/api/preferences/preference';
import ChangelogModal from '../ChangelogModal';
@@ -40,71 +51,165 @@ const mockChangelog: ChangelogSchema = {
jest.mock(
'react-markdown',
() =>
function ReactMarkdown({ children }: any) {
function ReactMarkdown({ children }: { children: ReactNode }): JSX.Element {
return <div>{children}</div>;
},
);
// mock useAppContext
jest.mock('providers/App/App', () => ({
useAppContext: jest.fn(() => ({
updateUserPreferenceInContext: jest.fn(),
userPreferences: [
{
name: USER_PREFERENCES.LAST_SEEN_CHANGELOG_VERSION,
value: 'v1.0.0',
},
],
})),
}));
function renderChangelog(onClose: () => void = jest.fn()): void {
const seenChangelogVersion: UserPreference = {
name: USER_PREFERENCES.LAST_SEEN_CHANGELOG_VERSION,
description: '',
valueType: 'string',
defaultValue: '',
allowedValues: [],
allowedScopes: ['user'],
value: 'v1.0.0',
};
const selfHostedContext: Partial<IAppContext> = {
activeLicense: {
...(getAppContextMock('ADMIN').activeLicense as LicenseResModel),
platform: LicensePlatform.SELF_HOSTED,
},
};
function renderChangelog(
onClose: () => void = jest.fn(),
appContextOverrides: Partial<IAppContext> = {},
): void {
render(
<MockQueryClientProvider>
<ChangelogModal changelog={mockChangelog} onClose={onClose} />
</MockQueryClientProvider>,
<ChangelogModal changelog={mockChangelog} onClose={onClose} />,
undefined,
{
appContextOverrides: {
userPreferences: [seenChangelogVersion],
...appContextOverrides,
},
},
);
}
describe('ChangelogModal', () => {
it('renders modal with changelog data', () => {
it('renders the dialog with the changelog data', async () => {
renderChangelog();
expect(
screen.getByText('What’s New ⎯ Changelog : June 10, 2025'),
).toBeInTheDocument();
await expect(
screen.findByTestId('changelog-dialog-title'),
).resolves.toHaveTextContent('What’s New ⎯ Changelog : June 10, 2025');
expect(screen.getByText('Feature 1')).toBeInTheDocument();
expect(screen.getByText('Description for feature 1')).toBeInTheDocument();
expect(screen.getByText('Bug fix details')).toBeInTheDocument();
expect(screen.getByText('Maintenance details')).toBeInTheDocument();
});
it('calls onClose when Skip for now is clicked', () => {
it('calls onClose when the close button is clicked', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const onClose = jest.fn();
renderChangelog(onClose);
fireEvent.click(screen.getByText('Skip for now'));
expect(onClose).toHaveBeenCalled();
await user.click(await screen.findByTestId('changelog-dialog-close'));
expect(onClose).toHaveBeenCalledTimes(1);
});
it('opens migration docs when Update my workspace is clicked', () => {
window.open = jest.fn();
it('offers no upgrade actions to a cloud workspace', async () => {
renderChangelog();
fireEvent.click(screen.getByText('Update my workspace'));
expect(window.open).toHaveBeenCalledWith(
await screen.findByTestId('changelog-content');
expect(
screen.queryByTestId('changelog-dialog-footer'),
).not.toBeInTheDocument();
expect(screen.queryByTestId('changelog-skip-btn')).not.toBeInTheDocument();
expect(screen.queryByTestId('changelog-update-btn')).not.toBeInTheDocument();
});
it('calls onClose when Skip for now is clicked', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const onClose = jest.fn();
renderChangelog(onClose, selfHostedContext);
await user.click(await screen.findByTestId('changelog-skip-btn'));
expect(onClose).toHaveBeenCalledTimes(1);
});
it('opens migration docs when Update my workspace is clicked', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const open = jest.spyOn(window, 'open').mockImplementation(() => null);
renderChangelog(jest.fn(), selfHostedContext);
await user.click(await screen.findByTestId('changelog-update-btn'));
expect(open).toHaveBeenCalledWith(
'https://signoz.io/upgrade-path',
'_blank',
'noopener,noreferrer',
);
open.mockRestore();
});
it('scrolls for more when Scroll for more is clicked', () => {
renderChangelog();
const scrollBtn = screen.getByTestId('scroll-more-btn');
const contentDiv = screen.getByTestId('changelog-content');
if (contentDiv) {
contentDiv.scrollTo = jest.fn();
}
fireEvent.click(scrollBtn);
if (contentDiv) {
expect(contentDiv.scrollTo).toHaveBeenCalled();
}
describe('scroll for more', () => {
let scrollHeight: jest.SpyInstance;
let clientHeight: jest.SpyInstance;
beforeEach(() => {
scrollHeight = jest.spyOn(Element.prototype, 'scrollHeight', 'get');
clientHeight = jest.spyOn(Element.prototype, 'clientHeight', 'get');
});
afterEach(() => {
scrollHeight.mockRestore();
clientHeight.mockRestore();
});
it('is hidden while the content fits', async () => {
scrollHeight.mockReturnValue(400);
clientHeight.mockReturnValue(400);
renderChangelog();
await screen.findByTestId('changelog-content');
expect(screen.queryByTestId('scroll-more-btn')).not.toBeInTheDocument();
});
it('scrolls 600px further from the current position when clicked', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
scrollHeight.mockReturnValue(2000);
clientHeight.mockReturnValue(400);
renderChangelog();
const content = await screen.findByTestId('changelog-dialog-body');
Object.defineProperty(content, 'scrollTop', {
value: 100,
configurable: true,
});
const scrollTo = jest.fn();
Object.defineProperty(content, 'scrollTo', { value: scrollTo });
await user.click(await screen.findByTestId('scroll-more-btn'));
expect(scrollTo).toHaveBeenCalledWith({
top: 700,
behavior: 'smooth',
});
});
it('hides once the content is scrolled to the bottom', async () => {
scrollHeight.mockReturnValue(1000);
clientHeight.mockReturnValue(400);
renderChangelog();
const content = await screen.findByTestId('changelog-dialog-body');
await screen.findByTestId('scroll-more-btn');
Object.defineProperty(content, 'scrollTop', {
value: 600,
configurable: true,
});
fireEvent.scroll(content);
await waitFor(() =>
expect(screen.queryByTestId('scroll-more-btn')).not.toBeInTheDocument(),
);
});
});
});

View File

@@ -34,7 +34,7 @@
&-line {
position: absolute;
left: 0;
left: 3px;
top: 6px;
bottom: -30px;
width: 1px;

View File

@@ -0,0 +1,52 @@
import { useCallback, useEffect, useState } from 'react';
const SCROLL_STEP_PX = 600;
const MIN_OVERFLOW_PX = 24;
const BOTTOM_TOLERANCE_PX = 8;
interface UseChangelogScrollReturn {
contentRef: (node: HTMLDivElement | null) => void;
hasScroll: boolean;
scrollForMore: () => void;
}
export function useChangelogScroll(): UseChangelogScrollReturn {
const [content, setContent] = useState<HTMLElement | null>(null);
const [hasScroll, setHasScroll] = useState(false);
const checkScroll = useCallback((): void => {
if (!content) {
return;
}
const { scrollHeight, clientHeight, scrollTop } = content;
const isAtBottom =
scrollHeight - clientHeight - scrollTop <= BOTTOM_TOLERANCE_PX;
setHasScroll(scrollHeight > clientHeight + MIN_OVERFLOW_PX && !isAtBottom);
}, [content]);
useEffect(() => {
if (!content) {
return undefined;
}
checkScroll();
content.addEventListener('scroll', checkScroll);
return (): void => {
content.removeEventListener('scroll', checkScroll);
};
}, [content, checkScroll]);
const scrollForMore = useCallback((): void => {
content?.scrollTo({
top: content.scrollTop + SCROLL_STEP_PX,
behavior: 'smooth',
});
}, [content]);
// The dialog body owns the scroll; a second scroller inside it shows two scrollbars.
const contentRef = useCallback((node: HTMLDivElement | null): void => {
setContent(node?.closest<HTMLElement>('[data-slot="dialog-body"]') ?? null);
}, []);
return { contentRef, hasScroll, scrollForMore };
}

View File

@@ -9,7 +9,7 @@ import SyntaxHighlighter, {
import styles from './CodeBlock.module.scss';
interface CodeBlockProps {
export interface CodeBlockProps {
code: string;
language?: string;
className?: string;

View File

@@ -21,4 +21,9 @@
line-height: var(--paragraph-small-400-line-height);
margin: 0;
}
&__helper {
color: var(--l3-foreground);
margin: calc(var(--spacing-2) * -1) 0 var(--spacing-4) 0;
}
}

View File

@@ -68,7 +68,7 @@ describe('CreateServiceAccountModal', () => {
});
it('submit button becomes disabled after clearing the name field', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderModal();
const nameInput = await screen.findByTestId('create-sa-name-input-field');
@@ -86,7 +86,7 @@ describe('CreateServiceAccountModal', () => {
});
it('successful submit shows toast.success and closes modal', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderModal();
const nameInput = await screen.findByTestId('create-sa-name-input-field');
@@ -112,7 +112,7 @@ describe('CreateServiceAccountModal', () => {
});
it('pressing Enter again while creating sends one request', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
let requests = 0;
server.use(
rest.post(SERVICE_ACCOUNTS_ENDPOINT, (_, res, ctx) => {
@@ -146,7 +146,7 @@ describe('CreateServiceAccountModal', () => {
});
it('shows toast.error on API error and keeps modal open', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
server.use(
rest.post(SERVICE_ACCOUNTS_ENDPOINT, (_, res, ctx) =>
@@ -186,7 +186,7 @@ describe('CreateServiceAccountModal', () => {
});
it('Cancel button closes modal without submitting', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderModal();
const cancelBtn = await screen.findByTestId('create-sa-cancel-btn');
@@ -217,7 +217,7 @@ describe('CreateServiceAccountModal', () => {
});
it('keeps the footer usable when create permission is denied', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
server.use(setupAuthzDenyAll());
renderModal();
@@ -242,7 +242,7 @@ describe('CreateServiceAccountModal', () => {
});
it('shows "Name is required" after clearing the name field', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderModal();
const nameInput = await screen.findByTestId('create-sa-name-input-field');

View File

@@ -67,6 +67,21 @@
color: var(--bg-cherry-400) !important;
}
.info-text {
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
cursor: default;
color: var(--l2-foreground) !important;
}
.info-text:hover {
&.ant-btn-text {
background-color: unset !important;
}
}
.date-time-popover__footer {
border-top: 1px solid var(--l1-border);
padding: 8px 14px;

View File

@@ -1,5 +1,6 @@
import { useState } from 'react';
import { fireEvent, render, screen } from '@testing-library/react';
import { render } from '@testing-library/react';
import { fireEvent, screen, userEvent } from 'tests/test-utils';
import dayjs from 'dayjs';
import { mockAppLocation } from 'tests/router-mocks';
import * as timeUtils from 'utils/timeUtils';
@@ -157,7 +158,8 @@ describe('CustomTimePicker', () => {
expect(onValid).not.toHaveBeenCalled();
});
it('treats close after change like pressing Enter (blur + chevron)', () => {
it('treats close after change like pressing Enter (blur + chevron)', async () => {
const user = userEvent.setup();
const onValid = jest.fn();
const onError = jest.fn();
@@ -166,16 +168,13 @@ describe('CustomTimePicker', () => {
const input = screen.getByRole('textbox');
// Open and change value so "changed since open" is true
fireEvent.focus(input);
fireEvent.change(input, { target: { value: '5m' } });
fireEvent.blur(input);
await user.click(input);
await user.clear(input);
await user.type(input, '5m');
await user.tab();
// Click the chevron (which triggers handleClose)
const chevron = document.querySelector(
'.time-input-suffix-icon-badge',
) as HTMLElement;
fireEvent.click(chevron);
await user.click(screen.getByTestId('time-picker-close-chevron'));
// Should have applied the value (same as Enter)
expect(onValid).toHaveBeenCalledTimes(1);

View File

@@ -640,12 +640,14 @@ function CustomTimePicker({
size={14}
className="cursor-pointer time-input-suffix-icon-badge"
onClick={handleClose}
data-testid="time-picker-close-chevron"
/>
) : (
<ChevronDown
size={14}
className="cursor-pointer time-input-suffix-icon-badge"
onClick={handleOpen}
data-testid="time-picker-open-chevron"
/>
)}
</div>

View File

@@ -24,4 +24,10 @@
gap: 4px;
flex-shrink: 0;
}
&__nav {
display: flex;
align-items: center;
gap: 2px;
}
}

View File

@@ -9,7 +9,7 @@ export interface HeaderAction {
component: ReactNode; // check later if we can use direct btn itself or not.
}
interface DetailsHeaderProps {
export interface DetailsHeaderProps {
title: string;
onClose: () => void;
actions?: HeaderAction[];

View File

@@ -1,4 +1,8 @@
export type { HeaderAction } from './DetailsHeader/DetailsHeader';
export type {
DetailsHeaderProps,
HeaderAction,
} from './DetailsHeader/DetailsHeader';
export { default as DetailsHeader } from './DetailsHeader/DetailsHeader';
export { default as DetailsPanelDrawer } from './DetailsPanelDrawer';
export type { DetailsPanelState, UseDetailsPanelOptions } from './types';
export { default as useDetailsPanel } from './useDetailsPanel';

View File

@@ -273,7 +273,7 @@ describe('EditMemberDrawer', () => {
it('enables Save after editing name and calls updateUser on confirm', async () => {
const onComplete = jest.fn();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
const mockMutateAsync = jest.fn().mockResolvedValue({});
(useUpdateUser as jest.Mock).mockReturnValue({
@@ -306,7 +306,7 @@ describe('EditMemberDrawer', () => {
it('does not close the drawer after a successful save', async () => {
const onClose = jest.fn();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderDrawer({ onClose });
@@ -331,7 +331,7 @@ describe('EditMemberDrawer', () => {
it('adding a new role creates a user role without removing existing ones', async () => {
const onComplete = jest.fn();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
const mockSet = jest.fn().mockResolvedValue({});
(useCreateUserRole as jest.Mock).mockReturnValue({
@@ -365,7 +365,7 @@ describe('EditMemberDrawer', () => {
it('deselecting a role deletes the user role by its assignment id', async () => {
const onComplete = jest.fn();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderDrawer({ onComplete });
@@ -392,7 +392,7 @@ describe('EditMemberDrawer', () => {
it('shows delete confirm dialog and calls deleteUser for active members', async () => {
const onComplete = jest.fn();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
(useDeleteUser as jest.Mock).mockImplementation((options) => ({
mutateAsync: mockDeleteMutate.mockImplementation(() => {
@@ -553,7 +553,7 @@ describe('EditMemberDrawer', () => {
it('calls deleteUser after confirming revoke invite for invited members', async () => {
const onComplete = jest.fn();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
(useDeleteUser as jest.Mock).mockImplementation((options) => ({
mutateAsync: mockDeleteMutate.mockImplementation(() => {
@@ -583,7 +583,7 @@ describe('EditMemberDrawer', () => {
it('calls updateUser when saving name change for an invited member', async () => {
const onComplete = jest.fn();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
const mockMutateAsync = jest.fn().mockResolvedValue({});
(useGetUser as jest.Mock).mockReturnValue({
@@ -641,7 +641,7 @@ describe('EditMemberDrawer', () => {
});
it('shows SaveErrorItem when updateUser fails for name change', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
(useUpdateUser as jest.Mock).mockReturnValue({
mutateAsync: jest.fn().mockRejectedValue(new Error('server error')),
@@ -669,7 +669,7 @@ describe('EditMemberDrawer', () => {
});
it('shows API error message when deleteUser fails for active member', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
(useDeleteUser as jest.Mock).mockImplementation((options) => ({
mutateAsync: mockDeleteMutate.mockImplementation(() => {
@@ -700,7 +700,7 @@ describe('EditMemberDrawer', () => {
});
it('shows API error message when deleteUser fails for invited member', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
(useDeleteUser as jest.Mock).mockImplementation((options) => ({
mutateAsync: mockDeleteMutate.mockImplementation(() => {
@@ -740,7 +740,7 @@ describe('EditMemberDrawer', () => {
});
it('does not open delete confirm dialog when Delete is clicked while disabled (isSelf)', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderDrawer({ member: selfMember });
await user.click(screen.getByRole('button', { name: /delete member/i }));
@@ -811,7 +811,7 @@ describe('EditMemberDrawer', () => {
isLoading: false,
});
server.use(setupAuthzDeny(buildUserUpdatePermission(selfMember.id)));
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderDrawer({ member: selfMember });
const input = await screen.findByDisplayValue('Alice Smith');
@@ -875,7 +875,7 @@ describe('EditMemberDrawer', () => {
});
it('does not open delete confirm dialog when Delete is clicked while disabled (root)', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderDrawer();
await user.click(screen.getByRole('button', { name: /delete member/i }));
@@ -886,7 +886,7 @@ describe('EditMemberDrawer', () => {
});
it('does not call createResetPasswordToken when Reset Link is clicked while disabled (root)', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderDrawer();
await user.click(
@@ -903,7 +903,7 @@ describe('EditMemberDrawer', () => {
});
it('calls POST and opens the reset link dialog with the generated link and expiry', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
renderDrawer();
@@ -925,7 +925,7 @@ describe('EditMemberDrawer', () => {
});
it('copies the link to clipboard and shows "Copied!" on the button', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
const mockToast = jest.mocked(toast);
renderDrawer();

View File

@@ -1 +1,2 @@
export type { WithErrorBoundaryOptions } from './withErrorBoundary';
export { default as withErrorBoundary } from './withErrorBoundary';

View File

@@ -53,7 +53,7 @@ describe('ErrorModal Component', () => {
// Click the close button
const closeButton = screen.getByTestId('close-button');
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
await user.click(closeButton);
// Check if onClose was called
@@ -145,7 +145,7 @@ it('should open the modal when the trigger component is clicked', async () => {
// Click the trigger component
const triggerButton = screen.getByText('Open Error Modal');
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
await user.click(triggerButton);
// Check if the modal is displayed
@@ -165,12 +165,13 @@ it('should close the modal when the onCancel event is triggered', async () => {
// Click the trigger component
const triggerButton = screen.getByText('error');
const user = userEvent.setup({ pointerEventsCheck: 0 });
const user = userEvent.setup();
await user.click(triggerButton);
await waitFor(() => {
expect(screen.getByText('An error occurred')).toBeInTheDocument();
});
const modal = screen.getByRole('dialog');
// Trigger the onCancel event
await user.click(screen.getByTestId('close-button'));
@@ -180,8 +181,6 @@ it('should close the modal when the onCancel event is triggered', async () => {
await waitFor(() => {
// check if the modal is not visible
const modal = document.getElementsByClassName('ant-modal');
const style = window.getComputedStyle(modal[0]);
expect(style.display).toBe('none');
expect(modal).toHaveStyle({ display: 'none' });
});
});

View File

@@ -20,7 +20,7 @@
display: flex;
flex-direction: column;
// radio option labels — popover content inherits the root font
// radio option labels — radix popover content inherits the root font
// size; pin to the app's 13px base the antd popover used to impose
label {
font-size: var(--label-base-400-font-size);

View File

@@ -1,6 +1,6 @@
// eslint-disable-next-line no-restricted-imports
import { Provider } from 'react-redux';
import { act, render, renderHook } from '@testing-library/react';
import { act, render, renderHook } from 'tests/test-utils';
import { DEFAULT_TIME_RANGE } from 'container/TopNav/DateTimeSelectionV2/constants';
import configureStore, { MockStoreEnhanced } from 'redux-mock-store';
import { useGlobalTimeStore } from 'store/globalTime/globalTimeStore';
@@ -42,13 +42,13 @@ describe('GlobalTimeStoreAdapter', () => {
globalTime: createGlobalTimeState(),
});
const { container } = render(
const { asFragment } = render(
<Provider store={store}>
<GlobalTimeStoreAdapter />
</Provider>,
);
expect(container.firstChild).toBeNull();
expect(asFragment().hasChildNodes()).toBe(false);
});
it('should sync relative time from Redux to Zustand store', () => {

View File

@@ -12,7 +12,7 @@ export type IntersectionCursorPluginOptions = {
gapSize?: number;
};
const defaultIntersectionCursorPluginOptions: Required<IntersectionCursorPluginOptions> =
export const defaultIntersectionCursorPluginOptions: Required<IntersectionCursorPluginOptions> =
{
color: 'white',
dashSize: 3,

View File

@@ -2,8 +2,14 @@ import { Typography } from '@signozhq/ui/typography';
function AnnouncementsModal(): JSX.Element {
return (
<div className="announcements-modal-container">
<div className="announcements-modal-container-header">
<div
className="announcements-modal-container"
data-testid="announcements-modal"
>
<div
className="announcements-modal-container-header"
data-testid="announcements-modal-header"
>
<Typography
variant="paragraph"
size="base"

Some files were not shown because too many files have changed in this diff Show More