Compare commits

...

3 Commits

Author SHA1 Message Date
Ashwin Bhatkal
f8a5e11dfb fix(sentry): ignore Safari's stale chunk MIME type error (#13843)
Some checks are pending
build-staging / prepare (push) Waiting to run
build-staging / js-build (push) Blocked by required conditions
build-staging / go-build (push) Blocked by required conditions
build-staging / staging (push) Blocked by required conditions
cacheci / tests (push) Waiting to run
Release Drafter / update_release_draft (push) Waiting to run
#### Description

- Sentry now ignores Safari's `'text/html' is not a valid JavaScript
MIME type` error, like the other stale-chunk errors.
- A tab that outlived a deploy asks for an old hashed chunk (here
`AIAssistantModal`), the server answers with `index.html`, and Safari
rejects it with this message. `lazyRetry` already recovers by reloading
once, so the event is noise.
- Chromium and Firefox already report this case with wordings the list
ignores. So does Safari's network-failure wording.
- PagerDuty: https://signoz-1.pagerduty.com/incidents/Q095A4QSMLC0T8
- Sentry: https://signoz-io.sentry.io/issues/7878025086/ (v0.152.0,
Mobile Safari on iOS, dashboard page)

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/804
2026-12-02 11:18:45 +00:00
ashu8912
1f6b0e6acc test(e2e): fix alerts flakes after rule FGA (#13823)
#### Description

Fixes two alerts e2e flakes introduced by the rule FGA merges.

- `alerts/views` TC-03 (failing most merge-queue runs): since #13756 a
view link applies its filter after the permission check, later than the
first rows. The spec now waits for the view's query before editing it.
- `alerts/planned-downtime` TC-01: since #13516 picker options are
disabled while their `attach` check runs, and Playwright clicks the
role-less option div anyway. `pickRule` and `antd.pickByName` now click
only enabled options.

Evidence for both is in `docs/flake-notes.md`.
2026-12-02 10:22:08 +00:00
Gaurav Tewari
52c2961368 fix(noz): space in Noz messages (#13816)
#### Description

- Every message sits 32px from the next, above and below a sent message,
per the design; it was 48px in the panel and 44px on the full page. Each
message ends in its 28px hover row, so messages keep 4px under that row
and no top padding.
- Error replies have no hover row, so one without a Retry button pads
the 32px itself; the Retry button sits 4px under its reply so that case
also comes to 32px.
- The space under the last message drops from 64px to 4px, so the thread
ends close to the disclaimer and input. The thread's top padding grows
from 16px to 24px so the first message stays put.
- Context chips under a sent message line up with its hover actions.

#### Issues closed by this PR

Closes SigNoz/nerve-pod#708

#### Screenshots / Screen Recordings

#### Additional Information

- No Storybook story shows an error reply, so that state is not in the
visual diff.

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-12-02 08:40:27 +00:00
10 changed files with 61 additions and 11 deletions

View File

@@ -162,6 +162,16 @@ describe('SENTRY_IGNORE_ERRORS', () => {
),
).toBe(true);
});
it('ignores Safari loading a stale chunk served as index.html', () => {
expect(
SENTRY_IGNORE_ERRORS.some((pattern) =>
pattern.test(
"TypeError: 'text/html' is not a valid JavaScript MIME type for module script 'https://example.us.signoz.cloud/assets/AIAssistantModal-cna5ncpr.js'.",
),
),
).toBe(true);
});
});
describe('isExpectedRequestFailure', () => {

View File

@@ -5,11 +5,14 @@ export const SENTRY_IGNORE_ERRORS = [
// A tab that outlived a deploy requests hashed assets the new build no longer
// has. `lazyRetry` recovers by reloading once, so this class is not worth
// reporting. The stylesheet message is Vite's own; the module ones are the
// same failure worded differently by Chromium, Firefox and Safari.
// same failure worded differently by Chromium, Firefox and Safari. Safari
// reports the MIME type one when the server answers the missing asset with
// index.html.
/Unable to preload CSS for/,
/Failed to fetch dynamically imported module/,
/error loading dynamically imported module/,
/Importing a module script failed/,
/is not a valid JavaScript MIME type/,
// Thrown by the bundled posthog-js when its recorder script fails to load, so
// its frames point at our own bundle and the URL check below misses it.
/Called on script loaded before session recording is available/,

View File

@@ -6,10 +6,10 @@
justify-content: flex-end;
gap: var(--spacing-3) var(--spacing-4);
margin-top: -28px;
padding: 0 calc(var(--spacing-8) + 28px) var(--spacing-4) var(--spacing-8);
padding: 0 calc(var(--spacing-8) + 28px) var(--spacing-2) var(--spacing-8);
&.compact {
padding: 0 calc(var(--spacing-3) + 28px) var(--spacing-3) var(--spacing-3);
padding: 0 calc(var(--spacing-3) + 28px) var(--spacing-2) var(--spacing-3);
}
}

View File

@@ -1,6 +1,7 @@
.message {
display: flex;
padding: 8px 16px;
// Each message ends in its 28px hover row; the 4px under it makes 32px between messages.
padding: 0 var(--spacing-8) var(--spacing-2);
// CSS variable consumed by MessageFeedback to fade in on hover.
--feedback-opacity: 0;
@@ -9,7 +10,12 @@
}
&.compact {
padding: 6px;
padding: 0 var(--spacing-3) var(--spacing-2);
}
// An error reply has no hover row, so it holds the 32px itself.
&.noActions {
padding-bottom: var(--spacing-16);
}
}
@@ -74,6 +80,10 @@
border-bottom-left-radius: var(--radius-2);
}
.assistant &:not(.error) {
padding-block: 0;
}
// The full page sets replies flush on the pane; errors keep their callout.
.assistant .fullPage &:not(.error) {
padding: 0 0 0 var(--spacing-5);
@@ -114,7 +124,7 @@
}
.retryButton {
margin-top: 6px;
margin-top: var(--spacing-2);
align-self: flex-start;
}

View File

@@ -142,6 +142,7 @@ export default function MessageBubble({
isUser ? styles.user : styles.assistant,
{
[styles.compact]: isCompact,
[styles.noActions]: isError && !showRetry,
},
);
const bodyClass = cx(styles.body, {

View File

@@ -9,12 +9,12 @@
// Room around the thread lives in its rows: Virtuoso measures only rows, so padding outside them leaves its scrolls short.
.row.first {
padding-top: var(--spacing-8);
padding-top: var(--spacing-12);
}
// Keeps the last bubble off the disclaimer and input bar.
.row.last {
padding-bottom: var(--spacing-32);
padding-bottom: var(--spacing-2);
}
// As wide as the full-page input; the extra 32px is the rows' own gutters.

View File

@@ -388,3 +388,24 @@ freshly seeded stack. The likely cause is the golden dataset, which `global.setu
rebases to the moment it runs: its newest log is 15 minutes old and its newest
span 30, so a spec that reads it through a short window only sees it for a while
after the seed. Reproduce CI with `--shard=N/10` per shard, not with one long run.
## AuthZ-gated select options drop clicks while their check runs
`alerts/planned-downtime` TC-01 failed all three attempts in 2 of about 15 CI
runs after planned downtime FGA (#13516). Opening the rule picker starts a
per-rule `attach` check (~400 ms on CI); until it answers, `AuthZSelect` renders
each option disabled. antd draws the option as a role-less `div`, so Playwright
ignores its `aria-disabled` and clicks it anyway, antd drops the click, and the
trace shows the click landing ~170 ms into the check with no tag after.
`pickRule` and `antd.pickByName` now match only
`.ant-select-item-option:not(.ant-select-item-option-disabled)`, so the click
waits for the check.
## A view link applies its filter after its permission check
`alerts/views` TC-03 failed all three attempts in most merge-queue runs after
alert rule views FGA (#13756). The views query now waits for the rule list
`useAuthZ` check, but the rules query does not, so `list.goto({ view })` returned
on unfiltered rows. The view's filter then landed mid-`runSearch` and replaced
the typed query (the failure snapshot shows the view's `warning` query in the
editor). The spec now waits for the view's query in the editor before editing.

View File

@@ -129,9 +129,10 @@ export function plannedDowntimeDriver(page: Page): PlannedDowntime {
const select = downtime.rulePicker();
await select.click();
await select.locator('input[role="combobox"]').fill(name);
// Options stay disabled while their authz check runs; antd drops a click on one.
await page
.locator('.ant-select-dropdown:not(.ant-select-dropdown-hidden)')
.locator('.ant-select-item-option')
.locator('.ant-select-item-option:not(.ant-select-item-option-disabled)')
.filter({ hasText: name })
.first()
.click();

View File

@@ -81,8 +81,9 @@ export function antdDriver(page: Page): Antd {
// one input event is all rc-select's search needs.
await select.locator('input[role="combobox"]').fill(name);
const dropdown = await antd.ownDropdown(select);
// Options stay disabled while their authz check runs; antd drops a click on one.
await dropdown
.locator('.ant-select-item-option')
.locator('.ant-select-item-option:not(.ant-select-item-option-disabled)')
.filter({ hasText: name })
.first()
.click();

View File

@@ -54,12 +54,15 @@ test.describe('Alert rules saved views', () => {
ownedViews,
}) => {
const scope = nameContains(alertList.namePrefix);
const original = `${scope} AND severity = 'warning'`;
const id = await ownedViews.create(viewName('update'), {
version: 'v1',
query: `${scope} AND severity = 'warning'`,
query: original,
});
await alerts.list.goto({ view: id });
// The view's filter lands after its permission check, later than the first rows.
await expect(alerts.list.search()).toHaveText(original);
const edited = `${scope} AND severity = 'critical'`;
await alerts.list.runSearch(edited);
await alerts.views.save();