Skip to content

design: modern SOC-style UI refresh (dark/light themes + design system)#2

Merged
velvetway merged 28 commits into
mainfrom
feat/design-refresh
Apr 17, 2026
Merged

design: modern SOC-style UI refresh (dark/light themes + design system)#2
velvetway merged 28 commits into
mainfrom
feat/design-refresh

Conversation

@velvetway
Copy link
Copy Markdown
Owner

Summary

Полный редизайн фронтенда по бандлу из Claude Design. Новая SOC-эстетика, дизайн-система на OKLCH-токенах, тёмная и светлая темы с переключателем, современный shell.

What's inside

  • Design tokens (src/tokens.css) — OKLCH, Inter + JetBrains Mono, 5 акцентных вариантов (indigo/cyan/emerald/amber/crimson), светофор риска по ФСТЭК
  • Primitive component library (src/components/design/) — Icon (карта на lucide-react), RiskBadge, Chip, Btn, IconBtn, KBD, Card, StatCard, Sparkline
  • Shell — Sidebar (collapsible, 3 секции, workspace selector), TopBar (breadcrumbs, ⌘K, theme toggle, user profile), CommandPalette (⌘K с фаззи-поиском по навигации и действиям)
  • Pages (6):
    • Dashboard (new) — stat strip + risk distribution + top-5 assets + threat feed + PTSZI formula callout
    • Risk Map — 5×5 intensity matrix + side panel + regulatory multipliers
    • Attack Graph — custom SVG Sankey S→ST→VL→DA + PTSZI breakdown panel (5 stat cards)
    • Assets — filter bar + table/cards toggle + detail drawer
    • Software Catalog — stat strip + filters + card grid с ФСТЭК/ФСБ бейджами
    • Simulator (RiskPreview) — 4 ползунка + живой W + пошаговый расчёт
  • Auth pages — Login + Register в новой стилистике с shield-логотипом
  • Theme systemdata-theme, data-accent, data-density на <html>, всё сохраняется в localStorage

Branches

Base: feat/graph-risk-model (PTSZI формула). Final merge: feat/graph-risk-modelmain, затем этот PR → main.

Test plan

  • CI=true npm run build в frontend/ — clean
  • Login → Dashboard → нажать ⌘K → выбрать любой пункт → открывается нужная страница
  • Theme toggle в TopBar переключает dark/light
  • Матрица рисков кликается → открывается граф атаки
  • Фильтры на Assets и Software работают
  • Симулятор пересчитывает W в реальном времени

🤖 Generated with Claude Code

velvetway and others added 27 commits April 17, 2026 18:25
Implements W = (Q_threat + q_severity + (1 - Q_reaction)) / 3 * Z
alongside the existing Impact x Likelihood calculator. Introduces:
  - CalculateW: clamped formula over Q/Z inputs
  - LevelFromW: thresholds 0.25/0.50/0.75 -> low/medium/high/critical
  - QReactionFromVLs: share of VLs covered by >=1 non-zero control
  - ZFromAsset: contour coefficient (isolated 0.5, prod 1.0, stage 0.75,
    otherwise 0.5)

14 new unit tests, full risk suite green (29/29). Existing calculator.go
is untouched; the service switches to CalculateW in task 8.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces legacy Sidebar/TopBar markup with design-system Sidebar +
TopBar + CommandPalette. Adds theme/accent/density state persisted to
localStorage (cr-state) and mirrored onto <html> as data-* attributes.
Breadcrumbs resolved from active nav item. Cmd/Ctrl+K toggles the
command palette; Escape closes it. All existing routes preserved.

Also disables the react-hooks/rules-of-hooks rule for the guarded
useAuth() call inside TopBar (the try/catch is intentional so the
component works outside AuthProvider in isolated previews).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- RiskMap: 'Новый сценарий' → navigate to /risk/preview; PDF toast
- Software: 'Добавить ПО' / 'Синхронизация реестра' → toast placeholders
- Unified PTSZI formula component with color-coded italic variables, proper sup sizing, accented backdrop. Replaces raw <sup> inline markup on Dashboard, Risk Graph, and Simulator.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@velvetway velvetway changed the base branch from feat/graph-risk-model to main April 17, 2026 20:07
@velvetway velvetway merged commit 0adc046 into main Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant