Blog··7 min read

From Angular to TUI: Designing Two Interfaces Around the Same Security Data

How DarkMoon keeps a web dashboard and a terminal UI consistent over the same pentest data: server-computed figures, shared words, and known gaps.

DarkMoon research series·C. OpenCode & TUI·Article 15 of 23·All 23 articles

Introduction

DarkMoon has two ways of reading a campaign. DarkMoon Pro has an Angular 21 web dashboard. Both editions have the Terminal Explorer, a plugin for the OpenCode console (see Bringing DarkMoon to the Terminal). They were built by the same team within weeks of each other, and they render the same documents. This article is about what it takes to keep two interfaces from telling two different stories.

Sources are the public darkmoon-visualization-research repository and the open-source explorer code in ASCIT31/Dark-Moon. The Angular client is proprietary; facts about it are cited from the research record, not from public code.

Problem

Two interfaces over the same data tend to drift in three ways:

  1. Numbers. Each client recomputes a score, a count or a ranking slightly differently.
  2. Words. One says « proven », the other « evidence-backed »; one says « fix », the other « action ».
  3. Capability. The richer client shows things the other cannot, and readers assume the poorer one is missing data.

DarkMoon had already met the first two inside a single client: a PDF that said both « 0 proven » and « 5 proven », and a tile whose count contradicted the plan below it (OBSERVED; both fixed). Adding a second client multiplies the risk.

Methodology

Rule 1: the server computes, the interfaces display

Every number on a view comes from a server document (the executive core: grade, coverage sentence, plan, legend, path kinds). Clients never recompute a score, a ranking or a path. New fields are optional, so older servers degrade gracefully (UXDR-14, OBSERVED). Word parity between the server and the Angular client is enforced by tests named test_exec_front_word_parity.py and test_exec_legend_front_parity.py (OBSERVED; file existence not re-checked in the research record).

Rule 2: one vocabulary

On 19 November 2026 a single legend was adopted across the 2D map, the path rail, the 3D legend, the report and the terminal: Evidence-Backed (solid + shield), Possible (dashed + dashed circle), Treatment in progress (dotted + wrench). The terminal's earlier labels (PROVEN · corroborated, DECLARED · not verified, INFERRED · hypothesis) were renamed to match (VERIFIED; earlier wording SUPERSEDED). The terminal legend ends with the line « The same words on the dashboard, in the report and here. »

Rule 3: different transports, same read model

Diagram. Figure 1. Three readers of one model. Only the transport differs.
Figure 1. Three readers of one model. Only the transport differs.
ConcernAngular dashboard (Pro)Terminal Explorer
StateAngular signals only (~129 signal(, ~477 computed(; no NgRx, no Subject)Solid signals inside the OpenTUI host
TransportHttpClient, HttpOnly session cookie + CSRF token, SSE for live runs, pollingPro: fetch with an in-memory bearer; Community: sandboxed Python over local JSON
Cachestores refreshed by polling (15 s idle / 5 s during a run, OBSERVED)60 s in-memory cache, one request per screen
GraphsELK layered path graph, Atlas 2D map, three.js/WebXR orbital mapvertical chain of node cards, Unicode or ASCII
TestsAngular unit tests 718 → 835 → 844 (VERIFIED for 835 from a log)bun 15 → 48; Community Python 29 → 32 (VERIFIED)

(Angular facts: VERIFIED from code at Pro commit d6bfc0d9 as reported in the research repository, unless marked.)

Real results

The same campaign, side by side

The research repository captured one synthetic campaign (a renamed copy of a DVGA lab campaign) in both clients.

Pro web dashboard, campaign overview: Cyber Score E 0/100 Rated, one coverage sentence, first three actions, and tiles for 34 exploited, 10 critical, 2 findings on attack paths and 14 actions.
Pro web dashboard, campaign overview: Cyber Score E 0/100 Rated, one coverage sentence, first three actions, and tiles for 34 exploited, 10 critical, 2 findings on attack paths and 14 actions.Original capture: ASCIT31/darkmoon-visualization-research
Community Terminal Explorer workspace at 120×40: totals, projects and campaigns, an executive pane with 'E 0/100 Rated' and the same coverage sentence, the first three treatment actions, and a campaign pane with 68 findings, 34 exploited and 17 paths, 0 evidence.
Community Terminal Explorer workspace at 120×40: totals, projects and campaigns, an executive pane with 'E 0/100 Rated' and the same coverage sentence, the first three treatment actions, and a campaign pane with 68 findings, 34 exploited and 17 paths, 0 evidence.Original capture: ASCIT31/darkmoon-visualization-research

The grade, the coverage sentence (« Full campaign, 3 test agents, 62 min of server-measured activity, 5 assets registered… »), the first three actions and the counts of 68 findings and 34 exploited appear in both, because both read the same executive document (VERIFIED, captures).

Where they legitimately differ: edition rules

On paths, the two Terminal Explorer editions differ on purpose. Pro shows 2 evidence-backed · 17 possible; Community shows 0 evidence-backed · 17 possible, because Community has no execution ledger and withholds agent-written evidence text from the engine, so it never proves a path (VERIFIED, captures and code).

Pro Terminal Explorer, attack-paths tab: '2 evid. · 17 poss.', with a selected 2-step Evidence-Backed Attack Path.
Pro Terminal Explorer, attack-paths tab: '2 evid. · 17 poss.', with a selected 2-step Evidence-Backed Attack Path.Original capture: ASCIT31/darkmoon-visualization-research
Community Terminal Explorer, attack-paths tab at 160×45: '0 evidence-backed · 17 possible', with a selected 3-step Possible Attack Path inferred by the server.
Community Terminal Explorer, attack-paths tab at 160×45: '0 evidence-backed · 17 possible', with a selected 3-step Possible Attack Path inferred by the server.Original capture: ASCIT31/darkmoon-visualization-research

Where they differ because the terminal is a terminal

  • No images: the OpenCode plugin API offers no graphics protocol.
  • Graphs become chains: branching paths are listed one by one, while the ELK graph draws shared assets once.
  • Markdown tables are drawn by the host component and cannot be restyled from the plugin.
  • Layout breakpoints by columns rather than pixels: wide ≥ 150, split ≥ 100, compact ≥ 80.

These are capability gaps, and the terminal says so in place rather than hiding them (for example, « This edition does not run retests: statuses are declarations, never verified » in the Community plan view; VERIFIED, capture).

Limits

  • One drift is still open: severity colours. The terminal uses #ff453a / #ff8a1f / #ffd426 / #2ec5d3, while the Angular severity tokens are #EF1600 / #FF9A3C / #F4FA6A / #50ADFD. The terminal's release notes say the dashboard's marks were used « verbatim »; whether that referred to an earlier token set is UNKNOWN.
  • Counting can diverge on one edge case. The executive legend and the path rail can count a corroborated derived path differently (0 difference on the demo data; OBSERVED).
  • Word parity is tested for the web client against the server; for the terminal, parity rests on the shared legend document and code review, not on a dedicated parity test that we could cite.
  • No user comparison between web and terminal for any task (not measured). No render-time measurement for the terminal (not measured). Web bundle: 1.23–1.26 MB raw initial in three production build logs (VERIFIED); no Lighthouse run (not measured).

Figures

  • Figure 1 (Mermaid): one model, three readers.
  • Captures: real UIs on synthetic demo data, screenshots/current/ in the research repository.

Scientific and technical sources (verified)

Fetched or checked on 2026-11-20.

Research, source code & reproducibility

Related reading: Bringing DarkMoon to the Terminal: Building an OpenCode Explorer · Designing a Premium Terminal Interface with OpenTUI · Progressive Disclosure in Vulnerability Management Interfaces · Redesigning a Cybersecurity Dashboard Around Attack Paths


If you maintain two clients over one security data model and have a better answer to word drift than parity tests, we would like to hear it on the research repository.

Next
Run it against your own lab

Darkmoon is open source (AGPL-3.0) and self hosted. Clone it, point it at a target you own, and read every line.