Skip to content

ENG-994: webapp_v2 pages take their colors from the theme, with a test that stops hand-picked colors - #2106

Merged
rogefm merged 5 commits into
mainfrom
rogerio/eng-994-webapp_v2-pages-take-their-colors-from-the-theme-with-a-test
Nov 4, 2026
Merged

rogefm merged 5 commits into
mainfrom
rogerio/eng-994-webapp_v2-pages-take-their-colors-from-the-theme-with-a-test

Conversation

@rogefm

@rogefm rogefm commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

📝 Description

Pages in webapp_v2 now pick a component, a variant or a role token, never a shade or a literal color. A test fails when someone adds one back. Pages that hand-picked gray-N read darker than their CLJS original, because the theme's gray scale starts at Radix step 3.

📣 User-facing impact

  • Borders and separators are a little lighter on several pages: the sidebar, tables, resource lists and cards.
  • Every React modal dims the page at 40%, as the CLJS dialogs do (Mantine's default was 60%). Every Divider takes the soft border.
  • App-wide, status text is darker: badges, alerts, light buttons and c="green". Mantine painted it with the filled shade, which fails WCAG AA on white (amber 2.2:1, yellow 1.6:1). The theme now uses the weight of the CLJS app's Radix soft text: green-7, red-7, blue-8, amber-8 and orange-9. Yellow text uses amber-8. This shows on every page, e.g. the "Update license" link, the "experimental" badges and the Approvals "Pending" badge (lead's decision).
  • One step darker, from the theme: the Native connections drawer title icon (primary light variant) and the sample payload in the Event catalog modal (terminal color, as Server logs). The lead accepted both (2026-11-03).

🔗 Related Issue

ENG-994

🚀 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI update
  • ♻️ Code refactor
  • ⚡ Performance improvement
  • ✅ Test update
  • 🔧 Build configuration change
  • 🧹 Chore

📋 Changes Made

  • test/themeColors.test.js scans src/ outside components/ and theme.js.
    • CSS is parsed with postcss: a shade, a hex, a color function or a named color fails.
    • JS strings are scanned: 'gray.6', --mantine-color-x-N, theme.colors.x[N], a shade built in a template (${x}.6, x + '.6'), a hex or an rgba() fails.
    • A one-off effect is allowed when its comment says theme-exception: and why. On main there is one: the first-run brand panel (2 rules). ENG-938 adds the RDP stage and canvas.
  • Theme pieces moved from ENG-938, so this PR merges first: Paper surface variants (subtle, outline, muted, strong, accent), the Divider and Modal defaults, role tokens (--hoop-surface-*, --hoop-border-*) and CLJS_PATTERNS.md.
  • Theme additions. The ticket scopes src/components and theme.js out of the cleanup, because colors live there; these additions are what moves colors out of the pages:
    • readable text for the status colors (--mantine-color-*-text and -light-color);
    • tokens for faint text, strong borders, the sidebar's Figma overlays, text on the brand navy, feature tints, a faint alpha overlay and the terminal palette (server logs);
    • Paper variants info and warning, Code variants accent, accent-outline and terminal, and Pill managed.
  • 21 CSS Modules and about 50 JSX files moved to these. Callout takes a tone instead of a color. Icon boxes use ThemeIcon.
  • webapp_v2/CLAUDE.md and COMPONENTS.md state the rule and the new variants, and point to the test. The guard uses postcss, already a devDependency.

🧪 Testing

  • main against this branch, side by side: two gateways from the same main binary on one database, so only the webapp differs. 39 React pages captured. Most differ only in the sidebar and header; Webhooks, Server logs, Resources, Protection rules and Sidecar details show lighter lines or surfaces.
  • Local, on 05ec64996 (rebased on main after ENG-913, plus the Qodo review fixes): npm run lint, npm test (279), npm run build. On rebase, the Resources status dot fix moved to RoleSummary (ENG-912); the managed attribute pill keeps ENG-913's new look (indigo-0 fill, indigo-7 text) through the Pill theme; the guard caught two gray shades in the new resource setup wizard, now theme tokens.
  • QA: PASS in round 5 at fdc4876e7. The lead accepted the two one-step changes above.

📸 Screenshots (if applicable)

Left: main. Right: this branch. Same database.

1. Eight places, side by side. A caption names what to look at: status text, lighter lines, the terminal color, a modal dimming at 40%.

Eight pages, main and ENG-994

Full-size video (MP4): 1-pages-side-by-side.mp4

2. The guard. A shade picked by hand, or built in a template, fails the test with file and line. The branch passes.

The guard fails on a hand-picked shade

3. Status text is readable. Approval history and the Event catalog: green-7, red-7, blue-8, amber-8.

Status text, main and ENG-994

4. Lines are lighter. Webhooks rows and the Sidecar details divider take the soft border.

Lighter lines, main and ENG-994

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

📄 Additional Notes

Based on main. It merges before ENG-938 (#2099), which is now stacked on it. No feature flag: colors only, no behaviour change.

🤖 Generated with Claude Code

@rogefm rogefm added the patch Bumps the patch version on release (bug fixes) label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Migration Safety Analysis

This PR no longer changes database migrations. Safe to deploy to sandbox.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

📋 API Changelog

API Changelog unknown vs. unknown

API Changes

GET /sessions

  • added the optional property data/items/review/allOf[#/components/schemas/openapi.SessionReview]/executed_by to the response with the 200 status

GET /sessions/{session_id}

  • added the optional property review/allOf[#/components/schemas/openapi.SessionReview]/executed_by to the response with the 200 status

@sandromello

Copy link
Copy Markdown
Contributor

✅ Build Completed with Success, Version=2106.0.0-gb7e1b10

@sandromello

Copy link
Copy Markdown
Contributor

✅ Build Completed with Success, Version=2106.0.0-g908282c

@sandromello

Copy link
Copy Markdown
Contributor

✅ Build Completed with Success, Version=2106.0.0-g3590b21

@rogefm
rogefm marked this pull request as ready for review November 3, 2026 15:12
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Theme-driven colors and feature-flagged React session details

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Move webapp_v2 page colors into theme tokens and component variants; guard against new hard-coded
 colors.
• Add feature-flagged React session details with CLJS openers, recordings, insights, and review
 actions.
• Expose review executors, correct overnight execution windows, and preserve renewed tokens across
 requests.
Diagram

graph TD
  CLJS["CLJS openers"] --> Host["Details host"] --> Store["Session store"] --> Gateway["Gateway APIs"]
  Store --> Viewers["Session viewers"]
  Theme["Theme tokens"] --> Viewers
  Theme --> Pages["App pages"]
  Guard["Color guard"] -. checks .-> Pages
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. ESLint and Stylelint color rules
  • ➕ AST-aware JSX checks could avoid regex false positives and missed constructs.
  • ➖ Requires two rule implementations and additional tooling; the current PostCSS-backed guard is simpler to adopt.

Recommendation: Keep the theme-owned tokens and variants, and retain the feature-flagged CLJS bridge for gradual session-details adoption. The current color guard is a practical starting point; consider AST-aware JS enforcement if exceptions or missed patterns become difficult to manage.

Files changed (201) +8364 / -360

Enhancement (109) +6162 / -57
featureflag.goGate React session details +7/-0

Gate React session details

• Adds the disabled-by-default experimental.sessions_react gateway flag.

common/featureflag/featureflag.go

docs.goDocument review executor +6/-0

Document review executor

• Adds executed_by to generated session-review API documentation.

gateway/api/openapi/autogen/docs.go

openapiv3.jsonExpose executor in OpenAPI schema +6/-0

Expose executor in OpenAPI schema

• Adds the optional review executor to the OpenAPI specification.

gateway/api/openapi/openapiv3.json

types.goType the review executor +3/-0

Type the review executor

• Adds executed_by to the session-review response type.

gateway/api/openapi/types.go

parser.goMap executor into responses +1/-0

Map executor into responses

• Copies the stored review executor into the session API response.

gateway/api/session/parser.go

000147_review_executed_by.up.sqlStore review executor email +9/-0

Store review executor email

• Adds a nullable executed_by column to private.reviews.

gateway/migrations/000147_review_executed_by.up.sql

reviews.goAtomically record review execution +17/-0

Atomically record review execution

• Introduces a single update that marks a review PROCESSING and stores its executor.

gateway/models/reviews.go

session.goRead executor with session review +3/-0

Read executor with session review

• Adds executed_by to the session review model and detail query.

gateway/models/session.go

accessrequest.goRecord access-request executor +1/-1

Record access-request executor

• Persists the executing user's email when an approved access request starts processing.

gateway/transport/interceptors/accessrequest/accessrequest.go

review.goRecord review-plugin executor +1/-1

Record review-plugin executor

• Persists the user's email when the review plugin starts an approved request.

gateway/transport/plugins/review/review.go

app.cljsWire CLJS session-details bridge +25/-6

Wire CLJS session-details bridge

• Registers the bridge and coordinates legacy session entry points with the React details host.

webapp/src/webapp/app.cljs

session_details_bridge.cljsBridge CLJS and React details +61/-0

Bridge CLJS and React details

• Dispatches React open events under the feature flag, retains the CLJS fallback, and refreshes affected session lists.

webapp/src/webapp/audit/session_details_bridge.cljs

session_item.cljsOpen details through shared bridge +2/-5

Open details through shared bridge

• Routes session-list detail actions through the flag-aware opener.

webapp/src/webapp/audit/views/session_item.cljs

events.cljsBridge native-access session opening +2/-4

Bridge native-access session opening

• Uses the shared session-details event for native-access review sessions.

webapp/src/webapp/connections/native_client_access/events.cljs

session_card.cljsBridge workflow session cards +2/-6

Bridge workflow session cards

• Opens workflow sessions through the flag-aware details entry point.

webapp/src/webapp/features/workflows/views/session_card.cljs

logs.cljsBridge web-terminal log sessions +3/-13

Bridge web-terminal log sessions

• Replaces direct legacy details opening with the shared session opener.

webapp/src/webapp/webclient/log_area/logs.cljs

main.cljsBridge web-terminal session actions +3/-7

Bridge web-terminal session actions

• Routes terminal session details through the shared opener.

webapp/src/webapp/webclient/log_area/main.cljs

Code.module.cssStyle semantic Code variants +17/-0

Style semantic Code variants

• Defines accent, bordered-accent, and terminal Code appearances outside page styles.

webapp_v2/src/components/Code/Code.module.css

theme.jsRegister Code variant styling +8/-0

Register Code variant styling

• Connects the Code component to its variant CSS module.

webapp_v2/src/components/Code/theme.js

Divider.module.cssStyle subtle dividers +6/-0

Style subtle dividers

• Sets the theme-owned default divider color.

webapp_v2/src/components/Divider/Divider.module.css

theme.jsRegister Divider theme +7/-0

Register Divider theme

• Applies the subtle divider styling to Mantine Divider instances.

webapp_v2/src/components/Divider/theme.js

theme.jsSet modal overlay treatment +7/-0

Set modal overlay treatment

• Defines a shared modal overlay appearance matching the legacy dialogs.

webapp_v2/src/components/Modal/theme.js

Paper.module.cssDefine role-based Paper surfaces +37/-0

Define role-based Paper surfaces

• Adds subtle, outline, muted, strong, accent, info, and warning surface variants.

webapp_v2/src/components/Paper/Paper.module.css

theme.jsConnect Paper variants to theme +2/-1

Connect Paper variants to theme

• Adjusts the Paper theme so shared variant surfaces can be selected by consumers.

webapp_v2/src/components/Paper/theme.js

theme.jsTheme managed pills +8/-8

Theme managed pills

• Moves managed-pill color choices into the shared Pill theme.

webapp_v2/src/components/Pill/theme.js

SessionDetails.module.cssStyle session-details modal +57/-0

Style session-details modal

• Defines responsive modal, scrolling content, header, and action-footer layout.

webapp_v2/src/features/SessionDetails/SessionDetails.module.css

SessionDetailsModal.jsxCompose session-details dialog +85/-0

Compose session-details dialog

• Combines loading and error states, session information, tabs, and context-sensitive actions in one modal.

webapp_v2/src/features/SessionDetails/SessionDetailsModal.jsx

InfoRow.jsxAdd reusable detail row +31/-0

Add reusable detail row

• Displays labeled session facts with a consistent icon and value layout.

webapp_v2/src/features/SessionDetails/components/InfoRow.jsx

InfoRow.module.cssStyle detail rows +9/-0

Style detail rows

• Provides layout and wrapping rules for session information rows.

webapp_v2/src/features/SessionDetails/components/InfoRow.module.css

PreviewUnavailable.jsxExplain missing previews +43/-0

Explain missing previews

• Provides a shared fallback when session input or output cannot be previewed.

webapp_v2/src/features/SessionDetails/components/PreviewUnavailable.jsx

ReviewBadge.jsxShow review state badge +23/-0

Show review state badge

• Maps review outcomes to semantic badge presentations.

webapp_v2/src/features/SessionDetails/components/ReviewBadge.jsx

SessionStatusBadge.jsxShow session status badge +21/-0

Show session status badge

• Displays session lifecycle status with themed badge colors.

webapp_v2/src/features/SessionDetails/components/SessionStatusBadge.jsx

ViewOptions.jsxShare viewer options control +22/-0

Share viewer options control

• Provides a consistent control for switching output representations.

webapp_v2/src/features/SessionDetails/components/ViewOptions.jsx

liveTail.jsDecode live session rows +170/-0

Decode live session rows

• Turns streamed events into query, terminal, and denial rows, and supplies timing helpers.

webapp_v2/src/features/SessionDetails/decoders/liveTail.js

pgWire.jsParse PostgreSQL wire events +73/-0

Parse PostgreSQL wire events

• Decodes PostgreSQL protocol frames for readable live queries.

webapp_v2/src/features/SessionDetails/decoders/pgWire.js

sessionFormat.jsSelect recording viewer +29/-0

Select recording viewer

• Chooses exec, live, RDP, SSH, PTY, or raw viewers using recording metadata and legacy fallbacks.

webapp_v2/src/features/SessionDetails/decoders/sessionFormat.js

sshDecoder.jsDecode SSH recordings +157/-0

Decode SSH recordings

• Interprets SSH frames and extracts replayable terminal data.

webapp_v2/src/features/SessionDetails/decoders/sshDecoder.js

terminalDecoder.jsDecode terminal event bytes +67/-0

Decode terminal event bytes

• Converts encoded event streams into terminal playback data.

webapp_v2/src/features/SessionDetails/decoders/terminalDecoder.js

index.jsxHost flag-gated session details +63/-0

Host flag-gated session details

• Lazy-loads the modal, listens for CLJS open events, and coordinates route-aware closing.

webapp_v2/src/features/SessionDetails/index.jsx

AiAnalysis.jsxDisplay AI analysis insight +108/-0

Display AI analysis insight

• Presents AI session-analysis findings and outcomes in the details view.

webapp_v2/src/features/SessionDetails/insights/AiAnalysis.jsx

DataMasking.jsxDisplay data-masking insight +153/-0

Display data-masking insight

• Shows masking metrics, configuration guidance, and RDP analysis information.

webapp_v2/src/features/SessionDetails/insights/DataMasking.jsx

Guardrails.jsxDisplay guardrail findings +134/-0

Display guardrail findings

• Renders guardrail decisions and associated session details.

webapp_v2/src/features/SessionDetails/insights/Guardrails.jsx

InsightCard.jsxShare insight-card layout +45/-0

Share insight-card layout

• Provides a common expandable presentation for analysis and guardrail insights.

webapp_v2/src/features/SessionDetails/insights/InsightCard.jsx

Insights.jsxPlace insights with relevant tabs +20/-0

Place insights with relevant tabs

• Associates AI analysis and guardrails with input or output content.

webapp_v2/src/features/SessionDetails/insights/Insights.jsx

helpers.jsSummarize insight metrics +72/-0

Summarize insight metrics

• Formats categories, counts, and masking analytics for insight cards.

webapp_v2/src/features/SessionDetails/insights/helpers.js

insights.module.cssStyle insight cards +24/-0

Style insight cards

• Defines layout and semantic presentation for session analysis cards.

webapp_v2/src/features/SessionDetails/insights/insights.module.css

ActionBar.jsxAdd state-aware session actions +262/-0

Add state-aware session actions

• Offers permitted review, execution, and native-connection actions according to user and session state.

webapp_v2/src/features/SessionDetails/sections/ActionBar.jsx

DetailsSkeleton.jsxShow session loading skeleton +26/-0

Show session loading skeleton

• Provides a placeholder while session details load.

webapp_v2/src/features/SessionDetails/sections/DetailsSkeleton.jsx

DetailsTabs.jsxBuild data-dependent detail tabs +77/-0

Build data-dependent detail tabs

• Shows available input, output, request, metadata, and runbook tabs, prioritizing blocking reasons.

webapp_v2/src/features/SessionDetails/sections/DetailsTabs.jsx

ErrorState.jsxShow detail-load errors +6/-0

Show detail-load errors

• Displays errors when the session cannot be loaded.

webapp_v2/src/features/SessionDetails/sections/ErrorState.jsx

Header.jsxAdd session header controls +88/-0

Add session header controls

• Displays session identity and header-level navigation and actions.

webapp_v2/src/features/SessionDetails/sections/Header.jsx

InfoModule.jsxShow expandable session facts +196/-0

Show expandable session facts

• Displays identity, review, status, creator, and execution information with optional expanded details.

webapp_v2/src/features/SessionDetails/sections/InfoModule.jsx

InfoModule.module.cssStyle session facts +13/-0

Style session facts

• Supports the responsive information-module layout.

webapp_v2/src/features/SessionDetails/sections/InfoModule.module.css

RejectModal.jsxCollect review rejection reason +39/-0

Collect review rejection reason

• Adds a confirmation dialog for rejecting a session review.

webapp_v2/src/features/SessionDetails/sections/RejectModal.jsx

RerunAction.jsxOffer session rerun +56/-0

Offer session rerun

• Handles the rerun action and its conditional prerequisites.

webapp_v2/src/features/SessionDetails/sections/RerunAction.jsx

TimeWindowModal.jsxSchedule reviewed execution +47/-0

Schedule reviewed execution

• Collects a time window when approving an executable session.

webapp_v2/src/features/SessionDetails/sections/TimeWindowModal.jsx

sessionState.jsCentralize session display decisions +108/-0

Centralize session display decisions

• Provides review permissions, output visibility, blocking reasons, and insight-selection helpers.

webapp_v2/src/features/SessionDetails/sessionState.js

AccessRequestTab.jsxShow access-request details +66/-0

Show access-request details

• Displays review-group and access-request information.

webapp_v2/src/features/SessionDetails/tabs/AccessRequestTab.jsx

InputTab.jsxShow session input +65/-0

Show session input

• Presents recorded input and handles large or unavailable input previews.

webapp_v2/src/features/SessionDetails/tabs/InputTab.jsx

MetadataTab.jsxShow session metadata +81/-0

Show session metadata

• Displays relevant metadata while excluding internal keys.

webapp_v2/src/features/SessionDetails/tabs/MetadataTab.jsx

OutputTab.jsxHost selected output viewer +27/-0

Host selected output viewer

• Selects the matching recording viewer and shows output insights.

webapp_v2/src/features/SessionDetails/tabs/OutputTab.jsx

RunbookTab.jsxShow runbook provenance +21/-0

Show runbook provenance

• Displays runbook information attached to a session.

webapp_v2/src/features/SessionDetails/tabs/RunbookTab.jsx

tabs.module.cssStyle detail tab contents +4/-0

Style detail tab contents

• Adds shared spacing for session-details tabs.

webapp_v2/src/features/SessionDetails/tabs/tabs.module.css

ExecOutput.jsxView executable-session results +120/-0

View executable-session results

• Switches between text and tabular results with download support and large-output handling.

webapp_v2/src/features/SessionDetails/viewers/ExecOutput.jsx

LiveTail.jsxStream live session output +272/-0

Stream live session output

• Combines recorded history with incoming events and terminal or query views.

webapp_v2/src/features/SessionDetails/viewers/LiveTail.jsx

PtyViewer.jsxReplay PTY output +64/-0

Replay PTY output

• Displays terminal recordings captured as PTY events.

webapp_v2/src/features/SessionDetails/viewers/PtyViewer.jsx

RawEvents.jsxShow raw event output +91/-0

Show raw event output

• Provides a fallback view for streams without a specialized decoder.

webapp_v2/src/features/SessionDetails/viewers/RawEvents.jsx

RdpPlayer.jsxSelect RDP replay presentation +34/-0

Select RDP replay presentation

• Wraps RDP playback and its analysis summary for session details.

webapp_v2/src/features/SessionDetails/viewers/RdpPlayer.jsx

SshViewer.jsxReplay SSH recordings +33/-0

Replay SSH recordings

• Chooses appropriate terminal playback for SSH-format session streams.

webapp_v2/src/features/SessionDetails/viewers/SshViewer.jsx

DownloadMenu.jsxOffer output download formats +33/-0

Offer output download formats

• Provides download choices for executable-session results.

webapp_v2/src/features/SessionDetails/viewers/exec/DownloadMenu.jsx

PlainText.jsxRender plain-text output +44/-0

Render plain-text output

• Displays executable output as readable text.

webapp_v2/src/features/SessionDetails/viewers/exec/PlainText.jsx

ResultsTable.jsxRender tabular results +88/-0

Render tabular results

• Uses a grid for parsed SQL-style output.

webapp_v2/src/features/SessionDetails/viewers/exec/ResultsTable.jsx

VirtualLines.jsxVirtualize long text output +62/-0

Virtualize long text output

• Limits rendered lines for large executable results.

webapp_v2/src/features/SessionDetails/viewers/exec/VirtualLines.jsx

download.jsBuild and request result downloads +41/-0

Build and request result downloads

• Separates client-side downloads from gateway-backed downloads for larger results.

webapp_v2/src/features/SessionDetails/viewers/exec/download.js

exec.module.cssStyle executable output +43/-0

Style executable output

• Styles text, table, and download presentation.

webapp_v2/src/features/SessionDetails/viewers/exec/exec.module.css

output.jsDecode and parse execution output +210/-0

Decode and parse execution output

• Decodes base64 output, normalizes tabular rows, and removes SQL Server context notices.

webapp_v2/src/features/SessionDetails/viewers/exec/output.js

index.jsLazy-load output viewers +12/-0

Lazy-load output viewers

• Maps recording types to independently loaded viewer components.

webapp_v2/src/features/SessionDetails/viewers/index.js

AnalysisStatus.jsxDisplay RDP analysis state +53/-0

Display RDP analysis state

• Shows progress and status for recording analysis.

webapp_v2/src/features/SessionDetails/viewers/rdp/AnalysisStatus.jsx

EntityLegend.jsxExplain RDP detection colors +45/-0

Explain RDP detection colors

• Provides controls and a legend for detected entity overlays.

webapp_v2/src/features/SessionDetails/viewers/rdp/EntityLegend.jsx

PlaybackControls.jsxControl RDP replay +92/-0

Control RDP replay

• Adds seek, play, speed, and fullscreen playback controls.

webapp_v2/src/features/SessionDetails/viewers/rdp/PlaybackControls.jsx

Rdp.module.cssStyle RDP player +67/-0

Style RDP player

• Styles the playback stage, controls, and analysis overlays.

webapp_v2/src/features/SessionDetails/viewers/rdp/Rdp.module.css

RdpAnalysisStatus.jsxConnect RDP analysis display +11/-0

Connect RDP analysis display

• Provides analysis status for session insight views.

webapp_v2/src/features/SessionDetails/viewers/rdp/RdpAnalysisStatus.jsx

RdpCanvas.jsxPaint RDP frames and detections +62/-0

Paint RDP frames and detections

• Draws bitmap frames and entity masking overlays on the playback canvas.

webapp_v2/src/features/SessionDetails/viewers/rdp/RdpCanvas.jsx

RdpStreamingPlayer.jsxStream paginated RDP replay +375/-0

Stream paginated RDP replay

• Loads frames in pages, replays them by timestamp, and coordinates PII overlays and controls.

webapp_v2/src/features/SessionDetails/viewers/rdp/RdpStreamingPlayer.jsx

RdpSummary.jsxSummarize RDP recording +37/-0

Summarize RDP recording

• Displays recording duration, frames, and analysis information.

webapp_v2/src/features/SessionDetails/viewers/rdp/RdpSummary.jsx

analysisPoller.jsPoll RDP analysis results +128/-0

Poll RDP analysis results

• Manages retries and polling until detection analysis reaches a terminal state.

webapp_v2/src/features/SessionDetails/viewers/rdp/analysisPoller.js

rdpLogic.jsExtract RDP playback logic +151/-0

Extract RDP playback logic

• Calculates frame positions and organizes detection snapshots and entity filters.

webapp_v2/src/features/SessionDetails/viewers/rdp/rdpLogic.js

rleDecoder.jsLoad RDP bitmap decoder +47/-0

Load RDP bitmap decoder

• Loads the shared RLE decoder needed before drawing RDP frames.

webapp_v2/src/features/SessionDetails/viewers/rdp/rleDecoder.js

useRdpAnalysis.jsProvide RDP analysis hook +35/-0

Provide RDP analysis hook

• Connects the player to analysis polling and retry state.

webapp_v2/src/features/SessionDetails/viewers/rdp/useRdpAnalysis.js

AsciinemaPlayer.jsxEmbed terminal recording player +18/-0

Embed terminal recording player

• Uses asciinema playback for decoded terminal sessions.

webapp_v2/src/features/SessionDetails/viewers/recording/AsciinemaPlayer.jsx

DeniedBadge.jsxMark denied stream events +14/-0

Mark denied stream events

• Identifies statements blocked by guardrails in recording views.

webapp_v2/src/features/SessionDetails/viewers/recording/DeniedBadge.jsx

EmptyStream.jsxExplain empty recordings +13/-0

Explain empty recordings

• Displays an appropriate state when a stream contains no viewable data.

webapp_v2/src/features/SessionDetails/viewers/recording/EmptyStream.jsx

LargeRecording.jsxHandle oversized recordings +26/-0

Handle oversized recordings

• Provides a fallback when session recordings exceed preview limits.

webapp_v2/src/features/SessionDetails/viewers/recording/LargeRecording.jsx

LogsText.jsxRender recording log text +11/-0

Render recording log text

• Displays text-based recording content.

webapp_v2/src/features/SessionDetails/viewers/recording/LogsText.jsx

TerminalTabs.jsxSwitch terminal representations +37/-0

Switch terminal representations

• Provides tabs for available terminal recording views.

webapp_v2/src/features/SessionDetails/viewers/recording/TerminalTabs.jsx

liveTail.module.cssStyle live-tail rows +84/-0

Style live-tail rows

• Defines terminal, query, and stream-row presentation.

webapp_v2/src/features/SessionDetails/viewers/recording/liveTail.module.css

recording.module.cssStyle recording viewers +69/-0

Style recording viewers

• Styles terminal playback and recording fallback states.

webapp_v2/src/features/SessionDetails/viewers/recording/recording.module.css

sessionStream.jsParse session stream responses +40/-0

Parse session stream responses

• Provides helpers for streamed session-event data.

webapp_v2/src/features/SessionDetails/viewers/recording/sessionStream.js

useSessionStream.jsSubscribe to live session events +141/-0

Subscribe to live session events

• Manages stream lifecycle, reconnection, and session updates for live output.

webapp_v2/src/features/SessionDetails/viewers/recording/useSessionStream.js

GatewayLayout.jsxMount session-details host +6/-4

Mount session-details host

• Adds the shared React modal host to the gateway layout.

webapp_v2/src/layout/GatewayLayout.jsx

sessions.jsRead React sessions flag +10/-0

Read React sessions flag

• Provides a shared selector for experimental.sessions_react.

webapp_v2/src/modes/sessions.js

auth.jsFetch user for supplied token +13/-0

Fetch user for supplied token

• Adds an account lookup for cross-tab opaque-token checks.

webapp_v2/src/services/auth.js

runbooks.jsExecute runbooks from details +3/-0

Execute runbooks from details

• Adds a runbook execution service operation for session reruns.

webapp_v2/src/services/runbooks.js

sessions.jsExpand session API operations +19/-1

Expand session API operations

• Adds expanded reads, execution, cancellation, reports, downloads, and RDP endpoints for details and viewers.

webapp_v2/src/services/sessions.js

useSessionDetailsStore.jsCoordinate session-details lifecycle +409/-0

Coordinate session-details lifecycle

• Manages loading, size limits, reviews, executions, polling, reruns, and list-refresh notifications.

webapp_v2/src/stores/useSessionDetailsStore.js

useUserStore.jsDetect cross-tab account changes +49/-0

Detect cross-tab account changes

• Tracks the session-download restriction and reloads when another tab signs into a different account.

webapp_v2/src/stores/useUserStore.js

theme.jsDefine semantic color system +76/-0

Define semantic color system

• Adds role tokens, terminal colors, readable status text, and registrations for new component themes.

webapp_v2/src/theme.js

datetime.jsHandle review-window time conversion +40/-0

Handle review-window time conversion

• Adds local-to-UTC conversion, display formatting, and overnight-window checks.

webapp_v2/src/utils/datetime.js

roles.jsShare session role helper +2/-0

Share session role helper

• Adds a role utility used by session-details presentation.

webapp_v2/src/utils/roles.js

Bug fix (5) +67 / -23
run-exec.goCorrect overnight execution windows +25/-16

Correct overnight execution windows

• Moves UTC time-window evaluation into a helper that accepts the after-midnight portion of overnight windows.

gateway/api/session/run-exec.go

api.jsPersist gateway-renewed tokens +20/-3

Persist gateway-renewed tokens

• Reads the current stored token for requests and saves renewal headers from successful and failed responses.

webapp_v2/src/services/api.js

liveEvents.jsRenew live-events token +3/-2

Renew live-events token

• Uses the current token for SSE requests and stores renewal response headers.

webapp_v2/src/services/liveEvents.js

serverLogs.jsRenew server-log stream token +3/-2

Renew server-log stream token

• Uses the current stored token and captures renewal headers for log streaming.

webapp_v2/src/services/serverLogs.js

useAuthStore.jsManage token renewal safely +16/-0

Manage token renewal safely

• Adds current-token access and renewal handling without replacing a newer token.

webapp_v2/src/stores/useAuthStore.js

Refactor (59) +198 / -241
CodeSnippet.module.cssUse terminal role colors +2/-2

Use terminal role colors

• Replaces selected shades with shared terminal surface and text tokens.

webapp_v2/src/components/CodeSnippet/CodeSnippet.module.css

index.jsxUse semantic gate color +1/-1

Use semantic gate color

• Replaces a selected shade with a theme-backed presentation choice.

webapp_v2/src/features/JiraPromptGate/index.jsx

FlowPanels.jsxTheme native connection panels +2/-3

Theme native connection panels

• Removes page-owned color choices from flow-panel presentation.

webapp_v2/src/features/NativeConnections/FlowPanels.jsx

NativeConnections.module.cssUse semantic connection colors +10/-18

Use semantic connection colors

• Replaces shades and literal overlays with themed surfaces, borders, and status colors.

webapp_v2/src/features/NativeConnections/NativeConnections.module.css

RoleRowStatus.jsxUse themed status appearance +1/-1

Use themed status appearance

• Removes a hand-picked role-row status color.

webapp_v2/src/features/NativeConnections/RoleRowStatus.jsx

ProfileCard.module.cssTheme protection-profile cards +5/-5

Theme protection-profile cards

• Replaces card surface and border shades with semantic tokens.

webapp_v2/src/features/ProtectionProfiles/ProfileCard.module.css

Header.module.cssTheme header styling +8/-8

Theme header styling

• Replaces header-specific shade choices with semantic text, border, and surface roles.

webapp_v2/src/layout/Header/Header.module.css

Layout.module.cssTheme layout surfaces +4/-4

Theme layout surfaces

• Moves layout background and separation colors to role tokens.

webapp_v2/src/layout/Layout.module.css

ConfigStatus.module.cssTheme sidebar configuration status +5/-5

Theme sidebar configuration status

• Uses semantic surface and status colors instead of fixed shades.

webapp_v2/src/layout/Sidebar/ConfigStatus/ConfigStatus.module.css

Sidebar.module.cssTheme sidebar states +13/-13

Theme sidebar states

• Replaces sidebar shades and literal overlays with navigation, surface, and border tokens.

webapp_v2/src/layout/Sidebar/Sidebar.module.css

SidebarCollapsed.jsxTheme collapsed-sidebar icon +1/-1

Theme collapsed-sidebar icon

• Removes a selected shade from the collapsed sidebar.

webapp_v2/src/layout/Sidebar/SidebarCollapsed.jsx

SidebarExpanded.jsxTheme expanded-sidebar icon +1/-1

Theme expanded-sidebar icon

• Removes a selected shade from the expanded sidebar.

webapp_v2/src/layout/Sidebar/SidebarExpanded.jsx

index.jsxTheme created-identity page +1/-1

Theme created-identity page

• Replaces a hand-picked color with a theme-backed role.

webapp_v2/src/pages/AiAgentsIdentities/Created/index.jsx

index.jsxTheme AI identity listing +3/-3

Theme AI identity listing

• Uses semantic colors for identity-list presentation.

webapp_v2/src/pages/AiAgentsIdentities/index.jsx

index.jsxTheme login presentation +1/-1

Theme login presentation

• Removes a page-owned shade from the login view.

webapp_v2/src/pages/Auth/Login/index.jsx

index.jsxTheme registration presentation +1/-1

Theme registration presentation

• Removes a page-owned shade from the registration view.

webapp_v2/src/pages/Auth/Register/index.jsx

Setup.module.cssTheme setup surfaces +6/-5

Theme setup surfaces

• Uses semantic navy text and surface tokens on setup panels.

webapp_v2/src/pages/Auth/Setup/Setup.module.css

index.jsxTheme setup controls +2/-2

Theme setup controls

• Replaces explicit setup-page shades with themed component choices.

webapp_v2/src/pages/Auth/Setup/index.jsx

index.jsxTheme compliance report +3/-3

Theme compliance report

• Moves report color choices to theme-backed components or roles.

webapp_v2/src/pages/ComplianceReport/index.jsx

index.jsxTheme event-routing details +9/-25

Theme event-routing details

• Uses ThemeIcon, Code variants, and semantic surface and text colors.

webapp_v2/src/pages/EventRouting/Detail/index.jsx

index.jsxTheme event-routing form +4/-4

Theme event-routing form

• Replaces form shades with component variants and role tokens.

webapp_v2/src/pages/EventRouting/Form/index.jsx

EventCatalogTab.jsxTheme event catalog +2/-2

Theme event catalog

• Uses themed colors for catalog content.

webapp_v2/src/pages/EventRouting/components/EventCatalogTab.jsx

EventDetailModal.jsxTheme event details modal +4/-15

Theme event details modal

• Replaces hand-built colored elements with shared themed components.

webapp_v2/src/pages/EventRouting/components/EventDetailModal.jsx

ReplayDispatchModal.jsxTheme dispatch replay modal +1/-1

Theme dispatch replay modal

• Removes a selected shade from the replay dialog.

webapp_v2/src/pages/EventRouting/components/ReplayDispatchModal.jsx

SubscriptionCard.jsxTheme subscription cards +2/-2

Theme subscription cards

• Uses role-based card styling instead of numbered shades.

webapp_v2/src/pages/EventRouting/components/SubscriptionCard.jsx

GroupListItem.module.cssTheme group-list separation +1/-1

Theme group-list separation

• Replaces a fixed border shade with a border-role token.

webapp_v2/src/pages/Features/AccessControl/components/GroupListItem.module.css

Create.module.cssTheme access-request form +3/-3

Theme access-request form

• Uses semantic surface and border tokens in the creation view.

webapp_v2/src/pages/Features/AccessRequest/Create/Create.module.css

index.jsxTheme access-request control +1/-1

Theme access-request control

• Removes a selected shade from the creation page.

webapp_v2/src/pages/Features/AccessRequest/Create/index.jsx

SystemPromptPreview.jsxTheme prompt preview +1/-1

Theme prompt preview

• Selects a themed preview appearance instead of a shade.

webapp_v2/src/pages/Features/AiSessionAnalyzer/Create/sections/SystemPromptPreview.jsx

RuleListItem.jsxTheme masking rule item +1/-1

Theme masking rule item

• Removes a hand-picked color from the rule-list item.

webapp_v2/src/pages/Features/DataMasking/components/RuleListItem.jsx

HoopCliModal.jsxTheme CLI instructions +1/-1

Theme CLI instructions

• Replaces a selected color in the CLI dialog.

webapp_v2/src/pages/Resources/sections/HoopCliModal.jsx

List.module.cssTheme resource-list divider +1/-1

Theme resource-list divider

• Uses a semantic list-border token.

webapp_v2/src/pages/Resources/sections/List.module.css

RoleRow.jsxTheme resource role row +1/-1

Theme resource role row

• Removes a selected shade from role presentation.

[Comment truncated to fit github's 65,536-char limit.]

@rogefm
rogefm force-pushed the rogerio/eng-994-webapp_v2-pages-take-their-colors-from-the-theme-with-a-test branch from 3590b21 to 3686e25 Compare November 3, 2026 15:17
@sandromello

Copy link
Copy Markdown
Contributor

✅ Build Completed with Success, Version=2106.0.0-g3686e25

@sandromello

Copy link
Copy Markdown
Contributor

✅ Build Completed with Success, Version=2106.0.0-gfdc4876

@rogefm
rogefm requested a review from luanlorenzo November 3, 2026 18:24
@rogefm rogefm self-assigned this Nov 3, 2026
@rogefm
rogefm force-pushed the rogerio/eng-994-webapp_v2-pages-take-their-colors-from-the-theme-with-a-test branch from fdc4876 to 2a9c30c Compare November 3, 2026 20:09
@sandromello

Copy link
Copy Markdown
Contributor

✅ Build Completed with Success, Version=2106.0.0-g2a9c30c

rogefm and others added 4 commits November 4, 2026 16:33
Paper variants, the Divider and Modal defaults, role tokens and the terminal palette.
ENG-938 used them first; ENG-994 now merges first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ps hand-picked colors

Status text uses the CLJS weight (green-7, red-7, blue-8, amber-8, orange-9).
The guard is test/themeColors.test.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eps its overlay

Two pages built shade 6 in a template; they use the palette's filled color.
The connection icon tile takes --hoop-overlay-faint again. postcss stays as on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ENG-913 added it with two gray shades; the guard caught them on rebase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rogefm
rogefm force-pushed the rogerio/eng-994-webapp_v2-pages-take-their-colors-from-the-theme-with-a-test branch from 2a9c30c to 3dbd898 Compare November 4, 2026 19:34
@qodo-code-review

qodo-code-review Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Some literal colors evade the guard ✓ Resolved

Resolving commit: 05ec649

Resolution reason
The JS literal detector now shares HEX and COLOR_FN alternatives with the CSS LITERAL detector.
COLOR_FN includes rgba?, hsla?, hwb, lab, lch, oklab, oklch and color, so JS_LITERAL now catches the
omitted functions. A block-level scan was also added for multi-line style objects and templates.
Description
JS_LITERAL recognizes fewer CSS color functions than the new CSS detector, omitting hwb, lab,
lch, oklab and color. A page can therefore set a literal such as `style={{ color: 'hwb(0 0%
0%)' }}` in JSX while the guard passes.

2. Auth pages set an inline style object ✓ Resolved

Resolving commit: 05ec649

Resolution reason
Both Auth pages replaced the inline style objects on Center/Box with Mantine style props (mih, bg,
w, maw, component="img" with w/display/mx/mb). The inline style prohibition is addressed in both
files by using Mantine props rather than a style object. This differs from the suggested CSS Module
approach but is a valid alternative that the finding explicitly allows ("or Mantine style props").
The theme test was also extended to detect multi-line inline style blocks, enforcing the rule.
Description
AuthCard in the login page passes an inline style={{ minHeight: '100vh', backgroundColor: ... }}
object to the Mantine Center, and this PR edits that line to swap the gray token for
--hoop-surface-muted. The sign-up page has the same pattern on its Center
(--hoop-surface-strong), so the rule's inline-style prohibition still applies to both lines. The
layout and color could instead come from a CSS Module class or Mantine style props, which would keep
the page's color source in one place.

3. Text strings can waive color violations ✓ Resolved

Resolving commit: 05ec649

Resolution reason
The exception check now uses JS_MARK, which requires the marker to follow //, /*, or a block-comment
* prefix on the same line, so a marker inside a plain string no longer waives a violation. The
comment-marker check is applied to the nearby lines via report(). The test header comment was also
updated to say string words do not count. The diff does not add a dedicated test with a marker
inside a string, unlike the suggested fix.
Description
jsViolations searches raw nearby lines for theme-exception: without checking whether the marker
appears in a comment. A string containing that phrase within two lines of a hard-coded page color
suppresses the violation even though no exception was documented.

View medium (1)
4. Multiline page colors evade the guard ✓ Resolved

Resolving commit: 05ec649

Resolution reason
The guard now also scans the full file text: new BLOCKS/BLOCK_COLOR regexes match multiline
style={{...}} objects and multiline template literals containing named colors, hex, or color
functions, and map each hit back to its source line via the offset. Line-level hits and block hits
are merged into a Set and reported with source positions through the report helper. This addresses
the multiline evasion, though it does not add the requested dedicated multiline tests in this diff.
Description
jsViolations checks one source line at a time, while JS_NAMED requires style={{ and the named
color on that same line and JS_LITERAL requires a quote before the literal on that line. A page
can add a normally formatted multiline style={{ color: 'red' }} or a multiline CSS template
containing background: #ff0000 without failing the new test.

Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #2099
✅ Compliance rules (platform): 125 rules
✅ Skills: build-ticket
✅ Cross-repo context — repo relationships
Review mode: Auto: 🚀 Fast: Styling-only swaps on auth pages, plus a self-contained test guard with no runtime impact.
✅ Fix-loop round: fix loop

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 05ec649

Results up to commit 3dbd898 ⚖️ Balanced


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Remediation recommended
1. Some literal colors evade the guard ✓ Resolved

Resolving commit: 05ec649

Resolution reason
The JS literal detector now shares HEX and COLOR_FN alternatives with the CSS LITERAL detector.
COLOR_FN includes rgba?, hsla?, hwb, lab, lch, oklab, oklch and color, so JS_LITERAL now catches the
omitted functions. A block-level scan was also added for multi-line style objects and templates.
Description
JS_LITERAL recognizes fewer CSS color functions than the new CSS detector, omitting hwb, lab,
lch, oklab and color. A page can therefore set a literal such as `style={{ color: 'hwb(0 0%
0%)' }}` in JSX while the guard passes.

2. Auth pages set an inline style object ✓ Resolved

Resolving commit: 05ec649

Resolution reason
Both Auth pages replaced the inline style objects on Center/Box with Mantine style props (mih, bg,
w, maw, component="img" with w/display/mx/mb). The inline style prohibition is addressed in both
files by using Mantine props rather than a style object. This differs from the suggested CSS Module
approach but is a valid alternative that the finding explicitly allows ("or Mantine style props").
The theme test was also extended to detect multi-line inline style blocks, enforcing the rule.
Description
AuthCard in the login page passes an inline style={{ minHeight: '100vh', backgroundColor: ... }}
object to the Mantine Center, and this PR edits that line to swap the gray token for
--hoop-surface-muted. The sign-up page has the same pattern on its Center
(--hoop-surface-strong), so the rule's inline-style prohibition still applies to both lines. The
layout and color could instead come from a CSS Module class or Mantine style props, which would keep
the page's color source in one place.

3. Text strings can waive color violations ✓ Resolved

Resolving commit: 05ec649

Resolution reason
The exception check now uses JS_MARK, which requires the marker to follow //, /*, or a block-comment
* prefix on the same line, so a marker inside a plain string no longer waives a violation. The
comment-marker check is applied to the nearby lines via report(). The test header comment was also
updated to say string words do not count. The diff does not add a dedicated test with a marker
inside a string, unlike the suggested fix.
Description
jsViolations searches raw nearby lines for theme-exception: without checking whether the marker
appears in a comment. A string containing that phrase within two lines of a hard-coded page color
suppresses the violation even though no exception was documented.

View medium (1)
4. Multiline page colors evade the guard ✓ Resolved

Resolving commit: 05ec649

Resolution reason
The guard now also scans the full file text: new BLOCKS/BLOCK_COLOR regexes match multiline
style={{...}} objects and multiline template literals containing named colors, hex, or color
functions, and map each hit back to its source line via the offset. Line-level hits and block hits
are merged into a Set and reported with source positions through the report helper. This addresses
the multiline evasion, though it does not add the requested dedicated multiline tests in this diff.
Description
jsViolations checks one source line at a time, while JS_NAMED requires style={{ and the named
color on that same line and JS_LITERAL requires a quote before the literal on that line. A page
can add a normally formatted multiline style={{ color: 'red' }} or a multiline CSS template
containing background: #ff0000 without failing the new test.

Grey Divider

Qodo Logo

Comment thread webapp_v2/test/themeColors.test.js Resolved
Comment thread webapp_v2/test/themeColors.test.js Resolved
Comment thread webapp_v2/test/themeColors.test.js Resolved
…multi-line styles

The guard shares one color-function list for CSS and JS, sees a color split
across lines, and counts a theme-exception mark only in a comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 05ec649

@sandromello

Copy link
Copy Markdown
Contributor

✅ Build Completed with Success, Version=2106.0.0-g05ec649

@rogefm
rogefm merged commit 773638b into main Nov 4, 2026
@rogefm
rogefm deleted the rogerio/eng-994-webapp_v2-pages-take-their-colors-from-the-theme-with-a-test branch November 4, 2026 20:21
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

patch Bumps the patch version on release (bug fixes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants