Keep environment-agnostic global attachments and errors visible per environment (fixes #869) - #927
Open
d-braun wants to merge 2 commits into
Open
Conversation
d-braun
force-pushed
the
fix/869-global-attachments-per-environment
branch
3 times, most recently
from
September 7, 2026 22:23
46f3af1 to
0873807
Compare
…e components/tests accordingly
d-braun
force-pushed
the
fix/869-global-attachments-per-environment
branch
from
September 8, 2026 10:08
0873807 to
93b5b2e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Fixes #869.
Files declared via
globalAttachmentswere only listed in the Global Attachments tab while theenvironment picker was set to All. As soon as a single environment was selected, the tab showed
0and rendered "No attachments information available" — even though such attachments aren'tenvironment-specific at all. In a multi-environment report that made them effectively unreachable,
because a single environment is exactly the view you work in while triaging one staging, language or
browser.
Cause
widgets/globals.jsoncarries two views of the same data: the flatattachmentslist and theper-environment
attachmentsByEnvindex. Global data which isn't bound to an environment is indexedunder the default environment by
AllureStore(#indexGlobalAttachment/#indexGlobalError), so itends up in the
defaultbucket. The frontend rendered onlyattachmentsByEnv[<selected env>]whilean environment was selected and therefore dropped the
defaultbucket — the one bucket that appliesto every environment.
Solution
A shared selector,
packages/web-awesome/src/utils/globals.ts, resolves the buckets to render:defaultbucket,because entries without an own environment are shared by all of them. This mirrors how quality
gate results behave: filterable per environment, but global when they carry no environment;
defaultselected — the shared bucket exactly once, no duplicates;attachmentsByEnv/errorsByEnvbreakdown — the flat list is treated asenvironment-agnostic and stays visible in every view.
The existing rendering rules are kept: a lone
defaultbucket renders as a plain list, anything elserenders as environment sections (the selected environment first, the shared one after it).
Applied to:
ReportGlobalAttachments— the reported case;ReportGlobalErrors— the same widget and the same defect, e.g. thestdout/stderrattachmentsand the "Test process has failed" error dispatched by
allure runcarry no environment anddisappeared the same way;
MainReport— the tab counters now count exactly what the tabs render.No changes to the report data model, the core store or the generators, so existing reports are fixed
by regenerating with the new frontend, and reports without a per-environment breakdown keep working.
Checklist
Verified with
yarn allure agent -- yarn workspace @allurereport/web-awesome test test/components/ReportGlobals.test.tsx test/utils/globals.test.ts→ 17 passed, exit 0,expectations: matched. Full package suite: 227 passed.yarn workspace @allurereport/web-awesome build,yarn format:checkandtsc --noEmitare clean (no new diagnostics).