Skip to content

design: readable stacked-fraction PTSZI formula#4

Merged
velvetway merged 31 commits into
mainfrom
feat/formula-readability
Apr 17, 2026
Merged

design: readable stacked-fraction PTSZI formula#4
velvetway merged 31 commits into
mainfrom
feat/formula-readability

Conversation

@velvetway

Copy link
Copy Markdown
Owner

Настоящая типографическая дробь — числитель сверху, дробная черта, знаменатель снизу. Полные надстрочные 'threat' / 'reaction' вместо обрубков 'th' / 're'. Цветовое кодирование переменных сохранено.

🤖 Generated with Claude Code

velvetway and others added 30 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>
… original PTSZI spec

- drop mocked 'Лента событий' Card and its feed[] array
- swap 'Инциденты/сут' and 'Открытых CVE' stats for real derivations (assets at risk, КИИ count)
- PTSZI variable descriptions: Q^threat / q^threat / Q^reaction / Z per original paper (степень реализации / опасности / предотвращения / коэффициент контура)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	frontend/src/pages/DashboardPage.tsx
- numerator and denominator stacked with visible fraction line
- full superscript words 'threat' / 'reaction' (not cropped 'th' / 're')
- larger W and Z, italic variables via Inter, monospace numerics
- proper spacing: breathes with size prop (md/lg/xl)
@velvetway velvetway merged commit daba54e into main Apr 17, 2026
2 checks passed
@velvetway velvetway deleted the feat/formula-readability branch April 17, 2026 20:21
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