design: readable stacked-fraction PTSZI formula#4
Merged
Conversation
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)
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.
Настоящая типографическая дробь — числитель сверху, дробная черта, знаменатель снизу. Полные надстрочные 'threat' / 'reaction' вместо обрубков 'th' / 're'. Цветовое кодирование переменных сохранено.
🤖 Generated with Claude Code