03 - Fissure GUI design
Fissure is a Linux desktop web-security toolkit written in C99 on top
of the Nilorea library, using the same GUI stack as the Hook API client
and the Sketchr drawing app: Allegro 5 for the window / event loop /
fonts / rendering, and Nilorea n_gui for every widget. No
ncurses, SDL, GTK, Qt, or third-party widget toolkit is used.
This document specifies the Fissure GUI and, before that, audits how the two sibling apps and the Nilorea widget toolkit work, so the design can copy what is proven and add only what is genuinely missing.
Hard requirements driving the design:
- The UI MUST be at least as responsive as Hook and Sketchr: live window resize with synchronous re-layout, and real DPI scaling (font included, not just widget bounds).
- The UI MUST reuse Hook's window model, z-order tiers, popup lifecycle, confirm/prompt dialogs, and theme system rather than reinvent them.
- New visual needs (hex viewer, big sortable grids, syntax view, split
panes, progress bars, charts) are added to Nilorea
n_guias reusable widgets, not bolted on inside Fissure, per the upstream-first rule.
Sibling documents (relative paths):
- Master plan: 00_MASTER_PLAN.md
- Architecture: 02_ARCHITECTURE.md
- Network and proxy core: 04_NETWORK_AND_PROXY.md
- Website scanner: 05_WEBSITE_SCANNER.md
- Reporting: 06_REPORTING.md
- Hook audit: audits/HOOK_AUDIT.md
- Sketchr audit: audits/SKETCHR_AUDIT.md
- Nilorea audit: audits/NILOREA_AUDIT.md
1. GUI audit: Hook
Full detail in audits/HOOK_AUDIT.md (sections 1-2). Condensed here to the parts Fissure copies.
1.1 Window model
Hook builds its whole interface from four top-level layout windows
created with n_gui_add_window(), all
N_GUI_WIN_FRAMELESS and fixed-position so no title-bar
chrome overlaps:
| Window | Position | Contents |
|---|---|---|
| Toolbar | top, full width | global action buttons, combobox selectors |
| Sidebar | left | collection tree + history list |
| Main | center / right | request editor + response viewer |
| StatusBar | bottom, full width | status labels, environment color stripe |
Frameless layout windows do not stack widgets against their bottom edge, so they need no chrome allowance. Titled dialogs do (see 1.4).
1.2 Z-order tiers
n_gui z-order groups draw in a fixed order and the
stable sort cannot cross a group boundary:
ALWAYS_BEHIND < FIXED < NORMAL < ALWAYS_ON_TOP < POPUP
Hook assigns:
- Layout windows (toolbar/sidebar/main/statusbar):
N_GUI_ZORDER_NORMAL. - Tab content windows (Params/Headers/Body/Auth/Scripts/Settings):
each is its own window at
N_GUI_ZORDER_ALWAYS_ON_TOP, so it stays above Main even when Main is raised by a click. - Every popup plus the shared confirm/prompt:
N_GUI_ZORDER_POPUP. - The quit dialog:
N_GUI_ZORDER_POPUP, re-raised every frame so it stays frontmost over other popups.
n_gui_raise_window only reorders within the NORMAL and
POPUP groups; it is a no-op for ALWAYS_ON_TOP. A new popup must not
assume it outranks the quit dialog, whose per-frame raise reclaims the
top.
1.3 Widgets used
Hook drives nearly the whole n_gui surface: buttons
(rounded; ~111 uses), labels, single- and multi-line textareas,
comboboxes (with N_GUI_COMBOBOX_AUTO_WIDTH so the dropdown
fits the longest item and truncates with ...), checkboxes,
listboxes, N_GUI_TREE (collection hierarchy +
save-destination picker; type-agnostic, disambiguated by a parallel
is_folder[] tag array and user_data pointers),
N_GUI_TAB_PANEL (request and response tabs), and
N_GUI_KVTABLE (query-param and header editors, scale-aware
via n_gui_kvtable_relayout).
1.4 Popup lifecycle and the window-sizing rule
Every Hook popup module follows one pattern; Fissure copies it verbatim:
_ensure_built(ctx): lazyn_gui_add_window()once, store the static window id, start closed.<mod>_toggle(ctx): ensure built,n_gui_toggle_window, and when the window ends up open calln_gui_focus_window(ctx, win)so it raises within its group, takes keyboard focus on its first widget, and becomes the popup ESC will close first.<mod>_handles_window(win_id): a predicate so the central ESC handler can route the close to the owning module.<mod>_close_if_open(ctx):n_gui_close_windowplus state reset.
The enforced dialog window-sizing rule: widget y-coordinates are
relative to the client area (below the titlebar, inside the border). The
height passed to n_gui_add_window is the FULL outer
rectangle. So for every titled dialog:
CONTENT_H = top_pad + sum(widget heights + gaps) + bottom_pad
H = CONTENT_H + WIN_CHROME_H // chrome = titlebar(28) + border(2)
Omitting the chrome silently clips the bottom button row. Fissure
adopts this rule and centralizes it in a
FISSURE_GUI_WIN_CHROME_H constant.
ENTER on a dialog's primary action is bound with
n_gui_button_set_keycode_focused(ctx, btn, ALLEGRO_KEY_ENTER, 0, sources, n).
1.5 Confirm / prompt dialogs
Hook ships two shared single-instance modals: a Yes/No confirm and a single-line-input prompt. Every destructive operation (delete, replace, file overwrite) routes through the confirm dialog, and the message always names the specific target. Only one confirm exists at a time; ESC closes it. Fissure reuses the identical pattern for all of its destructive operations (delete target, clear history, drop scan results, overwrite report file).
1.6 Theme system
Hook defines a HOOK_THEME struct (~15
ALLEGRO_COLOR fields plus a name) with several built-in
palettes. HOOK_C_* macros read from
hook_gui_theme_current() so every widget color tracks the
live theme, while semantic colors (HTTP status, method) stay invariant.
A theme-generation counter plus a force-retheme flag drive per-widget
refresh after a theme change. An environment accent color can overlay
the accent + hover/active border and paint a thin statusbar stripe.
Fissure reuses the palette design (dark default plus alternates); it did
not carry over the env-accent overlay or the statusbar stripe.
FISSURE_THEME mirrors the struct (15
ALLEGRO_COLOR fields plus a name);
fissure_gui_theme.c builds the palette table and
FISSURE_C_* reads the live theme. The built-in set (chosen
from the Settings theme picker, cycled headless with
--selftest-theme N) is: Dark (default), Light, Solarized
Dark, High Contrast, and a cybersecurity-inspired batch, Dim (a soft
warm off-white light theme, less glare than pure-white Light), Matrix
(green phosphor on black), Amber CRT (amber monochrome terminal),
Synthwave (outrun neon, magenta accent + cyan active), Red Team (red
accents on near-black), Dracula, Nord, Gruvbox Dark, Blue Team (blue
accents on near-black, the defender counterpart to Red Team), Slate
(neutral low-chroma grey), Tokyo Night (deep indigo with soft blue
accents), Catppuccin Mocha (pastel mauve on a soft dark base), One Dark
(cool blue accent on slate) and GitHub Light (a clean white light theme
with blue accents): 18 themes in all (FISSURE_THEME_COUNT).
Adding a theme is a palette block in build_themes() plus a
FISSURE_THEME_* id and a bumped
FISSURE_THEME_COUNT; the picker and test_theme
iterate the count, so a new theme wires in everywhere automatically.
1.6a Dialog decoration and layout persistence
The four frame windows stay frameless chrome, but the tool dialogs
(Settings and the workshop/utility popups) are decorated as normal
windows: a shared helper, fissure_gui_dialog_decorate, adds
the minimize + close titlebar buttons, a bottom-right resize grip and a
window scrollbar, applied in each popup's ensure_built. The
popups ARE user-resizable and their chosen size persists (n_gui's layout
JSON); fissure_gui_dialog_fit sets the content-derived size
as the window MINIMUM rather than a fixed size, so a dialog can never
shrink below what its controls need but can be grown, and
content-bearing popups reflow from the live window size (see 4.5). The
window scrollbar is the fallback for a window driven below its content:
it scrolls rather than clipping.
Dialog chrome arithmetic has one rule:
FISSURE_GUI_WIN_CHROME_H (title bar plus a small bottom
allowance) is applied in BOTH directions and is never scaled. A dialog
sizes itself as content height plus the chrome, and a reflow derives its
usable height as the live window height minus the same chrome, so the
allowance cancels and the content always clears the frame by the same
margin. It is not multiplied by the interface scale because n_gui does
not scale the title bar either; main.c pins
gui->style.titlebar_h to FISSURE_TITLEBAR_H
at startup so the constant is the single definition rather than a copy
of n_gui's default that could silently drift.
Decorated popups can also live in real OS windows. Settings >
Appearance > "Tool popups in their own OS windows" drives
fissure_gui_main_apply_native_popups, which detaches (or
re-attaches) every decorated popup via n_gui's native-window API. The
detach uses
N_GUI_DETACH_RESIZABLE | N_GUI_DETACH_OWN_CHROME:
own-chrome keeps n_gui drawing the dialog's own themed title bar, so the
window stays non-frameless and every layout that derives its client
height from FISSURE_GUI_WIN_CHROME_H keeps working
untouched, and the popup looks identical in both modes.
N_GUI_DETACH_SCALE_CONTENT is deliberately not used: the
dialogs reflow themselves rather than being stretched. The host side is
two calls in main.c, n_gui_set_event_queue before any
detach (n_gui registers each native window's event source there) and
n_gui_draw_detached once per frame after the queue is
drained. Because popups are built lazily, the apply runs every frame and
skips windows already in the requested mode. Only decorated dialogs
qualify, detected by the N_GUI_WIN_RESIZABLE marker
fissure_gui_dialog_decorate leaves: the fixed modals share
the POPUP tier but a transient question or a context menu has no
business becoming a separate OS window.
Every decorated popup carries the full title-bar button set
(minimize, maximize, close) via N_GUI_WIN_BTN_ALL. Maximize
fills the display and restores to the previous geometry, which suits the
content-bearing popups that reflow: a grid, diff or editor pane can take
the whole screen for one look and then snap back.
A popup with many options can group them onto in-window tabs rather
than one tall scroll. The scan-options popup
(fissure_gui_scanopts.c) is the pattern: a row of toggle
buttons at the top of the single popup window selects one group of
controls and hides the rest (via n_gui_set_widget_visible,
which also removes a hidden widget from hit-testing, focus and the
geometry audit). This stays one window, so the decorate /
dialog_fit / per-frame reflow / ESC-closes-topmost
machinery all keep working unchanged; the real
N_GUI_TAB_PANEL widget was not used because its tab pages
are separate windows, which that single-window machinery is not built
for. The height floor is sized to the tallest tab so switching tabs
never clips, and the active tab's trailing flex editor grows into any
extra height instead of leaving a band of dead space. The headless
--selftest-scanopts-tab <n> selects a tab so each can
be screenshot and swept.
Every decorated popup is also minimisable. The minimize icon
collapses it to its title bar (n_gui draws nothing else and hit-tests
nothing else), so a workshop can be parked on screen instead of closed
and loses no state. The minimised state is persisted with the rest of
the window geometry, so a popup left reduced comes back reduced. Opening
a popup always un-reduces it: fissure_gui_dialog_fit calls
n_gui_restore_window first, otherwise clicking the toolbar
or palette entry for a minimised popup would raise a window whose
content is still hidden and the control would look dead. The fixed modal
dialogs (confirm, prompt, quit, palette, search, context menu) are
deliberately not decorated and so are not minimisable: they are
transient or they hold a pending question, and hiding one behind a title
bar would strand the operator.
Settings > Appearance carries two reset actions. "Reset windows
and position" is the narrow one: it calls
fissure_gui_dialog_reset_geometry (popup windows only) and
deletes layout.json. "Reset GUI to defaults" is the whole-interface one
and routes through the shared confirm dialog, which names everything it
will discard before it acts: the appearance preferences in settings.json
(theme, interface size, corner style, tooltip delay), the toolbar model
(reset via fissure_toolbar_reset then re-applied, since
toolbar_apply re-saves the file), the Targets nav divider
width (fissure_gui_main_reset_nav_width, which has to clear
the Nav window geometry the width is carried on), and the state files
layout.json, toolbar.json plus the stale columns.json / panes.json left
over from before the persistence unification. Everything applies live;
nothing outside the GUI (scanning, proxy, TLS, AI, captured traffic,
findings, projects) is touched. Dialog heading text is
N_GUI_ALIGN_JUSTIFIED (left-aligned, word-wrapped) with the
heading height sized to fit the wrapped lines, so a long description
wraps within the fixed dialog width instead of overflowing (a
single-line CENTER/LEFT label would truncate); this is safe because the
width is fixed, so the wrap does not butt against a moving edge. Each
popup sizes itself through fissure_gui_dialog_fit on every
open, which treats the content size (computed by the popup's
layout() at the current UI scale) as a FLOOR: it becomes
the window minimum and the window is grown to at least that size, while
a larger size chosen by the operator or restored from
layout.json is kept. That floor is what prevents the old
"dialogs are the wrong size" bug (a size persisted at an earlier
interface scale clipping the content) without discarding a user resize.
The helper also un-minimises the popup
(n_gui_restore_window), clamps the size to the display, and
keeps the window's position (a user move, or a position restored from
the saved layout), nudging it back on-screen only when the size would
push it past the display edge. Whole-session geometry persists through
n_gui's layout JSON I/O (n_gui_save_layout_json on exit,
n_gui_load_layout_json at startup, matched by window title)
to <config>/layout.json; n_gui's deferred-restore
path applies the saved POSITION to a lazily-created popup the first time
it is built (fissure_gui_dialog_fit then only raises it to
the content minimum if the restored size is smaller). The Settings
"Reset windows and position" button
(fissure_gui_dialog_reset_geometry
- deleting the layout file) returns every popup to its default centered position.
Hover tooltips use n_gui's built-in timed-tooltip support: a widget's
description is set with n_gui_set_widget_tooltip. It is an
enforced rule (CLAUDE.md), not a best effort: every interactive widget
across the views (toolbar/nav, Target, Proxy, Repeater, Intruder,
Findings, Report, Dashboard) and the workshop/editor popups carries a
one-line tooltip, and every text input/output carries a placeholder hint
(n_gui_textarea_set_placeholder, or a descriptive adjacent
label, as in the shared prompt dialog). Only self-evident controls are
exempt: a plain Close/Cancel/OK button, an obvious Refresh, pure section
labels, the context-menu items (the label is self-describing), and the
Help topic-selector toggles (the label is the topic). The hover delay is
the n_gui style tooltip_delay, driven from a persisted
tooltip_delay_ms setting (default 1300 ms, 0 disables) via
fissure_gui_apply_tooltip_delay at startup and on change.
The 60 fps redraw loop already keeps the frame current, so the bubble
appears on time without extra event-loop work.
1.6b Bundled fonts
Fissure ships its own TrueType fonts under
resources/fonts rather than depending on a system font
being installed. The reason is concrete: when no TTF loads, Allegro's
builtin bitmap font takes over, and that font is a fixed-size bitmap
that ignores the requested pixel size, so the whole interface renders at
one tiny size and the Interface-size setting appears to do nothing. That
is exactly what a Windows build did while the only candidates were a
resource path that did not exist and two hardcoded Linux system
paths.
fissure_font (pure, no Allegro, unit-tested by
tests/test_font) is the table of choices: a display name,
the resource-relative TTF path, a monospace flag and a one-line
description used as the picker's tooltip. The picker is proportional
only: the chosen face is the single typeface for the whole interface,
chrome included, and a fixed-width face sets prose labels wider than the
boxes the chrome lays out for them, so they overflow into their
neighbours. Five proportional faces ship for the picker: DejaVu
Sans (the default, widest character coverage and the widest and
tallest per line, so a layout that fits here fits the rest),
Inter (drawn for screen interfaces), Noto
Sans (broadest script coverage), Roboto
(screen-interface face matching the default's line height) and
Liberation Sans (the metrics of the common system
sans). Two monospaced faces, JetBrains Mono and
IBM Plex Mono, remain bundled but are not picker
choices: they are the fixed-width face the Markdown renderer draws
inline code and raw bytes in (see fissure_gui_mdfonts), where columns
must line up. Each font's license travels with it in
resources/fonts/LICENSES, and resources/ is
already copied wholesale into the AppImage, the .deb and
the NSIS installer, so the fonts ship on every platform.
load_ui_font(px, font_id) in main.c tries
the chosen bundled face first, then the other bundled faces (so a
missing or corrupt file degrades to a real font rather than to the
bitmap fallback), then a short list of well-known system fonts covering
Linux, Windows and macOS, and only then the builtin font, which is
logged as a WARNING because it means the install is missing its
resources. The selection is a persisted preference
(FISSURE_SETTINGS::font_id) chosen in Settings >
Appearance > Font and applied live: the main loop watches
font_id alongside ui_size_index and reloads
the font and rebuilds the layout on the same path, because both changes
mean new glyph widths and therefore a full re-measure of every label,
button and column.
1.7 Per-frame custom overlays
Anything n_gui cannot draw, Hook paints itself in
main.c AFTER n_gui_draw: the sidebar drag-drop
indicators and the response "Times" waterfall (cascading horizontal
bars, each offset by the cumulative preceding duration, sized to the
live response-area width every frame so it reflows on resize, with
theme-invariant bar colors). Fissure uses this
after-n_gui_draw hook only for its nav divider grip; its
severity chart and site-map graph are drawn through n_gui's window
content-draw callback and custom widget instead, so they clip, scroll
and stack with their windows (see 4.9).
2. GUI audit: Sketchr
Full detail in audits/SKETCHR_AUDIT.md (sections 2-3). Sketchr is the model for responsiveness and DPI; Fissure adopts its recipe to beat Hook on font scaling.
2.1 Single event loop with deferred redraw
sketchr_app_run() is one while (running)
loop:
- Block on
al_wait_for_event(). - The GUI consumes pointer events first; then the active state handles the rest.
- A timer updates time-based state.
- Draw ONLY when the event queue is empty (so a flood of
MOUSE_AXEScoalesces into a single frame) AND aredrawflag is set. - Frame cap via a minimum frame interval.
The lesson Fissure took: draw only when the event queue is empty, so
bursts of events coalesce into one frame. Fissure does also redraw on
its 60 fps timer (FISSURE_FPS), because its views pick up
worker-thread results (captured rows, findings, job progress) in their
per-frame ticks; see 4.8.
2.2 Resize handler
On ALLEGRO_EVENT_DISPLAY_RESIZE, Sketchr does three
things synchronously in the same handler:
case ALLEGRO_EVENT_DISPLAY_RESIZE:
al_acknowledge_resize(display); // MANDATORY, or the display wedges
app_refresh_display_size(app); // cache new width/height
sketchr_gui_rebuild(app); // re-lay-out all n_gui windows
redraw = true;Never skip al_acknowledge_resize().
2.3 The ui_scale DPI recipe (the key part)
Sketchr keeps ONE ui_scale multiplier, recomputed once
per init / resume / resize / settings-change:
- desktop base 1.0 (overridable for testing),
- times a user size factor (Small/Normal/Large/Huge = 0.85/1.0/1.15/1.3).
Then:
- EVERY GUI metric constant (margins, panel widths, row heights,
button sizes) is stored as a base value and multiplied by
ui_scalein a singlemetrics_update()step before layout, so the whole UI grows/shrinks uniformly. - The font size scales too:
font_px = round(BASE_FONT_PX * ui_scale), and the font is RELOADED at that size on resize / settings change. This is the one thing Hook does NOT do (Hook scales widget bounds but leaves the font fixed), and it is exactly what Fissure must do to look crisp at any DPI.
A single coordinate transform (canvas-to-screen and its inverse) is the source of truth for all scalable drawing in Sketchr; Fissure uses the same idea for the sitemap graph and chart overlays so coordinates never drift.
3. GUI audit: Nilorea n_gui
Full detail in audits/NILOREA_AUDIT.md (section 3 for capabilities/gaps, section 5D for widgets to add).
3.1 What exists
n_gui already provides: windows (draggable / resizable /
frameless, the z-order groups listed in 1.2, auto-scrollbar,
N_GUI_RESIZE_ADAPTIVE, auto-fit sizing), buttons (toggle,
bitmap, keycode bind), textareas (single and multi, ~4096 char cap),
listboxes (single/multi), radiolists, comboboxes (AUTO_WIDTH), sliders,
scrollbars, checkboxes, labels (with hyperlink), dropmenus, image
display, tab panel, tree, kvtable, sectionlist, per-widget themes, focus
+ raise APIs, and DPI detection.
3.2 Gaps for a security tool
This table is the ORIGINAL gap analysis, kept for the reasoning. Five of the six were added to Nilorea and Fissure uses them today; the "n_gui today" column describes n_gui as it was when the table was written, not as it is.
| Need (Fissure) | n_gui when this was written | Action | Status |
|---|---|---|---|
| Hex view/edit of raw bodies | none | ADD N_GUI_HEXVIEW |
SHIPPED |
| 10k+ row history / findings table | listbox (flat, not virtualized, not sortable) | ADD N_GUI_DATAGRID |
SHIPPED |
| JSON / HTML / JS / HTTP syntax color | plain textarea | ADD N_GUI_SYNTAXVIEW |
SHIPPED |
| Request/response side-by-side | manual two windows | ADD N_GUI_SPLITPANE |
SHIPPED |
| Long-scan progress | none | ADD N_GUI_PROGRESSBAR |
SHIPPED |
| Font scales with DPI/resize | bounds scale, font fixed | ADD n_gui_set_ui_scale |
still a proposal |
These are added to Nilorea (not Fissure-local) per the upstream-first
rule; the full proposed signatures are in section 5 below, which records
what shipped and how the real API differs, and they are cross-referenced
in audits/NILOREA_AUDIT.md section 5D. n_gui_set_ui_scale
is the one that did not happen: Fissure computes its own
ui_scale and reloads the font itself, which works but keeps
that recipe out of the library.
4. Fissure GUI design
4.1 Top-level window layout
Fissure copies Hook's frameless fixed-position layout-window model, with four layout windows:
| Window | Position | Contents |
|---|---|---|
| Toolbar | top, full width | collapsible category dropdowns (single row by default, wraps when narrow) grouping every module: views, tool popups, Browser, Settings, Help, palette |
| Nav | left | Targets pane: live list of scanned hosts (host + endpoint count), click to seed the Target view |
| Work | center / right | the active view (Dashboard, Repeater, Proxy, Target, Findings, Report, Intruder) |
| StatusBar | bottom, full width | proxy state, capture counter, scan progress summary |
All four are N_GUI_WIN_FRAMELESS and fixed-position. The
view switcher in the Toolbar selects which view occupies the Work
window; views are mutually exclusive and switched the way Hook switches
tabs (n_gui_close_window / n_gui_open_window
on per-view content windows, each built lazily once).
The Nav/Work boundary is user-draggable: the Targets pane width
(FISSURE_GUI_METRICS.nav_w, derived each frame from an
adjustable base width s_nav_w_base times the ui scale)
follows a divider drag handled at the main-loop level
(fissure_gui_main_nav_divider_event, called before
n_gui_process_event and consuming the event when it grabs
the boundary; a grip is painted over the frame afterward by
fissure_gui_main_draw_nav_divider). The width is clamped to
[FISSURE_NAV_W_MIN_BASE,
min(FISSURE_NAV_W_MAX_BASE, half the display)], mirroring
the in-view N_GUI_SPLITPANE dividers used inside the Proxy
(url-list vs inspection) and Repeater (tab-list vs editor, plus
headers-vs-body and request-vs-response) views. An inter-window boundary
cannot use a splitpane widget (a widget lives inside one window), so it
is a small custom drag.
Persisted GUI-layout state is unified in n_gui's layout JSON
(<config>/layout.json, one load/save in main.c gated
by layout_persist so selftests stay deterministic).
n_gui_save/load_layout_json persists window geometry AND
the user-adjustable state of any widget given a persist key
(n_gui_widget_set_persist_key): a splitpane's divider
ratio, a datagrid's column order/visibility/width. So Fissure keys its
splitpanes (proxy.main/proxy.detail,
repeater.list/repeater.hdrbody/
repeater.reqresp) and its persisted grids
(proxy/findings/sitemap/intruder,
via fissure_gui_columns_bind), and n_gui restores them when
each view builds and keys its widgets (lazily-created widgets restore
through the same pending mechanism as lazily-created windows). The
Targets nav-pane width rides on the "Nav" window's geometry (seeded back
into the metric on the first build after load). There is no separate
panes.json or columns.json.
Window scrollbars (Hook parity): every per-view content window
carries N_GUI_WIN_AUTO_SCROLLBAR, and each view lays its
widgets out at a minimum content size (FISSURE_WORK_MIN_W x
FISSURE_WORK_MIN_H, scaled) while the window keeps its actual work-area
size. When the window is large enough this is a no-op (content fits, no
scrollbar); when it is too small the widgets overflow the window and
n_gui scrolls them (it derives the content extent from the placed
widgets), so no control becomes unreachable on a small window. The
Settings popup already used the same flag for its long control list.
The Toolbar presents Fissure's 51 modules (the k_modules
registry in fissure_gui_main.c: seven view switchers plus
the Fissure Browser launcher, Help, Settings, the command-palette
launcher, and a long list of tool popups) as collapsible category
dropdowns rather than a flat button strip. The grouping is a data model,
fissure_toolbar (a pure, tested helper): rows, each an
ordered list of renamable, toggleable categories, each an ordered list
of stable module-id references. The model supports two rows; the
built-in defaults put every category on a single row (row 0), with
Config last, and leave row 1 empty (a user can still move categories
onto a second row from the customizer). The default categories, in
order, are:
- Home (Fissure, Dashboard, Help, About), Organize & collaborate (Organizer, Tags, Workflows, Team, Schedules, Project), Auth & session (Session, Tokens, Auto-replay, SAML, Cookie jar), Recon & infra (OAST, Probes, Raw proxy, Rules, User Agents, Env), Capture (Scope, Proxy, Intercept rules, Browser, DOM Invader, HTTP/3 fetch, HTTP/3 proxy, Target), Test & attack (Repeater, Intruder, GraphQL), Results (Findings, Jobs, Purple team, Report), Analysis & inspection (Multitool, Logger, Event log, Attack surface, Search, Comparer, Raw edit, Sequencer, HaE), Power-ups (Extensions, Import checks, AI chat), Config (Plugins, Pools, Settings).
The two setup groups (Auth & session, Recon & infra) sit directly after Organize & collaborate and before Capture: they hold what an operator configures - the session, the tokens, the cookie jar, the User-Agent, the OAST collector, the match/replace rules - before capturing or attacking anything.
Because the order lives in a file the user owns, a saved
toolbar.json keeps the category order of the build that
wrote it. The model is therefore versioned
(FISSURE_TB_VERSION, stored as version in the
JSON): after load and reconcile, fissure_toolbar_migrate
brings a layout saved by an older build forward by re-sorting its
categories into the current built-in order, then the caller persists it,
so the migration runs exactly once. Category labels, visibility,
membership, and module order are all preserved, and user-created
categories keep their relative order after the built-in ones.
The model stores only ids; the human label, tooltip, and action for a
module id come from a registry in fissure_gui_main.c
(k_modules, the single source of truth for which modules
exist in code), so the model stays Allegro-free and unit-testable.
Presentation uses the upstream N_GUI_TYPE_DROPMENU widget
(a button with a chevron that opens an entry panel). Because n_gui has
no widget deletion, a fixed pool of dropmenu widgets (one per possible
category slot per row) is created once and re-labelled, re-positioned,
and shown/hidden every layout_toolbar pass to match the
config; the panel entries are built lazily by an on_open
callback when a menu opens, so there is no per-frame churn. A category
renders only when it is visible and has at least one visible module;
rows wrap to further visual rows when the window is too narrow. Only one
dropdown is open at a time (n_gui's open_dropmenu_id), the
chevron flips while open, and the category whose dropdown holds the
active view is labelled "Category: Module" so the operator sees where
they are. layout_toolbar returns the total toolbar height
so the work area begins below it. The category button stays sized to its
short label, but the open panel widens to fit its widest entry: upstream
n_gui_dropmenu_panel_width returns max(button width,
longest entry text + padding + scrollbar) and the draw and hit-test
paths share it, so entries like "DOM Invader" or "HTTP/3 proxy" under
the Capture category are never clipped by a narrow category button. When
adding a module, add one k_modules entry (id, label, view
id or -1, action) and, if it should appear by default, add its id to the
defaults in fissure_toolbar.c; the command-palette entry is
still separately required (palette parity is enforced).
The old flat buttons still exist (created in
build_windows) but are all hidden; they remain only as
action carriers. Because n_gui does not fire the keycode of an invisible
widget, the view-switch shortcuts (F2-F10) are handled at the app level:
fissure_gui_main_handle_view_shortcut matches the pressed
key against the saved bindings and switches the view directly, so a
hidden view stays reachable by its shortcut and the command palette.
Layout customization: the "Customize toolbar" action (Settings >
Toolbar, or the command palette) opens
fissure_gui_toolbaredit, a popup showing the rows, their
categories, and each category's modules as an indented tree ([x] marks
visible). It can Show/Hide and Move up/Move down a selected category or
module, Rename a category, reassign a module to another category (the
"Move module to" picker), and Reset to defaults. Every edit persists to
toolbar.json and rebuilds the live toolbar at once
(fissure_gui_main_toolbar_apply). On load the saved layout
is reconciled against the registry
(fissure_toolbar_reconcile): dead module references and
duplicates are dropped, and any real module missing from an older saved
config is re-homed into its default category (or an "Ungrouped"
category), so a module is never silently lost when the build adds
one.
The Toolbar window enforces a minimum size (al_set_window_constraints to FISSURE_MIN_W x FISSURE_MIN_H) so it cannot shrink to where the toolbar and views become unusable, on window managers that honor constraints.
Datagrid columns can also be hidden, resized, and reordered, persisted per grid. The n_gui datagrid (upstream) carries a per-column visible flag and a display-order indirection over the physical cells; dragging a column's right border in a grid header resizes it live. Persistence is unified into n_gui's layout JSON: each grid calls fissure_gui_columns_bind at build to register itself (by a stable name, for the customizer's picker) and take that name as its persist key, so n_gui_save/load_layout_json stores and restores its {order, visible, width}. A stored layout whose column count no longer matches the live grid is ignored, so a schema change never applies stale positions. The "Customize grid columns" action (Settings > Appearance, or the command palette) opens a shared popup (fissure_gui_columns) with a grid picker plus per-column show/hide and move up/down, applied live to the grid and captured at save time. Eight grids are wired (Proxy, Findings, Target, Intruder, Logger, HaE, the Jobs monitor and the Pools popup); a grid is added by calling fissure_gui_columns_bind(app, grid_id, name) after its columns are created, which registers it in the customizer and gives it a persist key.
Column widths are given at interface scale 1.0 and applied at the live scale: every grid creates its columns through fissure_gui_columns_add rather than n_gui's add_column, and a live interface-size change carries the widths with it through fissure_gui_columns_rescale (which walks the widget tree, so a grid is covered whether or not it registered for customization, and a hand-dragged width moves proportionally rather than snapping back). A column width was the last metric in a view still counted in absolute pixels while every pane around it was multiplied by the scale, which is why at the Small interface size the panes lost fifteen percent, the columns kept every pixel, and nearly every grid in the program opened scrolled sideways.
One column per view grid is the FLEX column, and the view's layout calls fissure_gui_columns_fit on it after placing the grid: the metadata columns keep whatever width they have (a default, a drag, or a restored one) and the flex column absorbs the rest, so the columns exactly fill the pane at any window size. It is the content column in each case, the one with nothing to gain from a fixed width and the most to lose from a short one: URL in the Target grid, Title in Findings, Request in Intruder, Tab in the Repeater's tab list, Path and Line in the two Purple team tables. Below a per-grid floor (FISSURE_GUI_COL_MIN_*) it stops shrinking and the grid scrolls sideways, which is the designed fallback for a pane too narrow for the columns at all. Two consequences worth knowing: the flex column is recomputed every frame, so a drag on IT does not stick (a drag on any other column does, and persists); and hiding a column through the customizer hands its width to the flex column rather than leaving a gap. Before this, the widths were tuned to look right at one window size, and at a 1024-wide window the Findings grid opened already scrolled sideways with a quarter of its columns off the edge. The Repeater's tab list is the one whose pane comes from a divider rather than the window, so its layout also holds the divider at or right of what its own columns need (capped at a third of the pane, so a widened column can never eat the editors).
A datagrid row can also carry a background tint (n_gui_datagrid_set_row_color, upstream): the tint is painted under the cell text, follows its row through a column sort, and the cell text flips to black or white per the tint luminance so it stays legible in every theme; a selected tinted row is darkened and outlined instead of filled, so selection and tint both read. Fissure uses it for rule-classified rows: fissure_gui_theme_hilite maps a highlight color name (from a Highlighter/Extractor rule or a manual per-flow highlight) to its tint, the Proxy flow list paints each flow with it, and the HaE rule editor previews each rule in the color it applies. The tints are semantic and theme-invariant, like the severity colors. A grid that classifies rows should paint them AND keep the classification as a text cell, so it stays sortable, filterable, and readable without relying on color alone.
ASCII layout sketch:
+--------------------------------------------------------------------+
| Toolbar: category dropdowns [Home v][Organize v][Auth v][Recon v] |
| [Capture v][Test & attack v][Results v][Analysis v][Power-ups v] |
| [Config v] (each opens its module buttons; see 4.1) |
+-------------------+------------------------------------------------+
| Nav (Targets | Work window (active view content) |
| host list) | |
| | |
| | |
+-------------------+------------------------------------------------+
| StatusBar: Proxy listening :8080 | 1423 captured | Scan 62% | ... |
+--------------------------------------------------------------------+
4.2 Views
The view switcher exposes these views; each is one content window in the Work area (z-order ALWAYS_ON_TOP so it stays above Work/NORMAL on raise).
Dashboard. The recon overview (fissure_gui_dashboard): scan state, captured exchanges, endpoint counts by source (crawl vs proxy), distinct hosts, the in-/out-of-scope endpoint split, and findings by severity with a custom-drawn severity bar chart (a window content-draw callback over Allegro primitives). It reads the live inventory/findings/captures stores under the scan lock and refreshes only when a count changes. See 05_WEBSITE_SCANNER.md section 11.
Proxy / Intercept. The HTTP-history table (every captured request/response) over a request/response split, plus an intercept editor when intercept is on. A filter bar above the flow grid narrows what is displayed (scope only limits what is captured, not shown): a search field matches, case-insensitively, a composed "method URL status MIME" haystack as a substring or, with the "re" toggle on, as a regex (n_pcre, compiled once per change; an invalid/half-typed regex falls back to substring so the list never blanks); a "Status" cycle limits by status family (2xx..5xx) and a "Scope" cycle by in/out-of-scope membership (rebuilt from the settings scope). The match is the pure, unit-tested fissure_flow_filter_match; rows keep their true 1-based flow index in column 0 so selection still resolves when intermediate flows are filtered out. The right detail panes show a hint until a flow is selected, then the selected flow's request (top) and response (bottom); a "To Repeater" button loads the selected flow's request into the Repeater for replay. A "Capture cookies" toggle in the action row folds the session cookies of in-scope proxied traffic into the suite-wide jar (every response's Set-Cookie and every request's Cookie header, the latter being the only way a session established before the proxy was attached ever gets in), so browsing the target logged in authenticates the scanner, the Repeater and manual sends afterwards. It is off by default, because it changes what every later tool sends, and persisted in settings. A "Find" button in the same action row opens the in-message find on the selected flow's response pane (the same action as Ctrl+F, repeated with Ctrl+G), so the search has a control an operator can see and not only a key; the button sits in the wrapping action row, so it re-flows with its neighbours at any window width. "Pin for diff" snapshots the selected flow's response as a baseline and "Diff" renders a line diff (fissure_diff) of another flow against it in the response pane, handy for boolean/IDOR/auth signal. Global Search reveals a flow here through fissure_gui_proxy_reveal_flow: it selects the row whose "#" cell is the flow's stable capture index (never a display position, since a header sort physically reorders the rows), scrolls to it and fires the grid's own select callback so the request/response panes load; when the filter bar hides that row the whole filter bar is cleared and the reason is stated in the status line and in an info popup, and a flow the history no longer holds is reported the same way instead of switching views. When intercept is on and a request is held, the bottom strip shows the held request with Forward / Drop / Inspector: Forward sends the (possibly edited) bytes, Drop discards them. The held request reuses the Repeater's response-view set, picked by a selector on the strip: Raw (the editable textarea, the default and the authoritative pane Forward reads), Pretty (an HTTP-highlighted N_GUI_SYNTAXVIEW), Hex (an N_GUI_HEXVIEW), and Rendered (fissure_htmlview_render, useful for an HTML request body); the four share one rectangle and the read-only previews are refreshed from the current Raw text on each switch, so they reflect in-progress edits. A fresh held request opens in Raw. Inspector opens the shared structured editor (fissure_gui_inspector) on the held request: it splits the raw bytes via fissure_inspect_split_raw, lets you edit headers / query params / cookies / body params as fields, and on Apply reassembles the raw request (with the held request line and version) back into the editor to Forward (refreshing any visible preview). A WebSocket flow (a 101 Switching Protocols response, marked is_ws) captures every frame relayed after the upgrade: as the proxy pumps bytes both ways it feeds them to a per-connection FISSURE_WSCAP (fissure_wscap, over the Nilorea n_ws_frame_parse codec) that reassembles partial frames, unmasks client frames, and stores each one (bounded by FISSURE_WS_MAX_FRAMES; the live captures are bounded by FISSURE_WS_MAX_CAPS and survive flow pruning, keyed by flow id). Selecting a WebSocket flow shows its frames in the response pane (sequence, direction C->S / S->C, opcode, length, and a printable payload preview), refreshed live as new frames arrive. When a WebSocket flow is selected (and no request is held for interception), the bottom strip turns into a frame-replay control: a text input and a Replay frame button reopen a fresh client connection to the flow's endpoint (fissure_wsrepeater over the Nilorea n_ws_connect/n_ws_send client), send the typed frame, and collect the server's replies, which are shown in a popup transcript (sent frame plus each reply). The replay runs on a worker thread with a bounded per-receive timeout so a quiet or slow endpoint cannot hang or freeze the UI; the button relabels to a spinner while it runs and cannot be re-triggered. The capture core is unit-tested (test_wscap), the proxy path by an integration test (test_proxy_ws), and the replay core by test_wsrepeater (loopback handshake, echo, ping/pong, and the silent-server timeout). Frame intercept also ships: when interception is enabled, a WebSocket flow's byte pump becomes frame-aware (pump_bidirectional / ws_process_acc in fissure_proxy.c) and holds each complete single-frame TEXT message in the same interception queue as HTTP requests, so it appears in the bottom intercept editor labelled "WS C->S frame" / "WS S->C frame" for forward / drop / edit (the Forward path skips the HTTP CRLF normalization for a held frame and re-masks client-to-server frames on the way out); binary, control, and fragmented frames pass through transparently, and interception off stays byte-transparent. The intercept path is covered by an integration test (test_proxy_ws_intercept: forward-unchanged, forward-edited, and drop through a real proxied upgrade). See 04_NETWORK_AND_PROXY.md for the capture engine. The Proxy view also runs the user "passive node" scripts on live traffic: as each newly captured (non-WebSocket) flow is folded into the grid, its raw response is parsed and every script under resources/checks runs against it in the passive stage, with any reported findings merged into the shared Findings store under its lock (fissure_userscripts_run_passive, tested by test_userscripts). The script set is loaded lazily on the first fold, so a run with no scripts installed costs nothing; findings appear in the Findings view like the native passive checks.
Target / Sitemap. The scan launcher and endpoint inventory of a target. The launcher controls are laid out on four rows so the URL field never competes for width with the action buttons: (1) the target URL field alone, spanning the full panel width; (2) the depth field, an "Active checks" toggle, an "Aggressive (SQLi/LFI)" toggle, a Scan button, a "Quick scan" button (the low-hanging-fruit profile: shallow crawl + safe active checks, routed through the active-scan confirmation), a "Seed from Proxy" button, an "Import API" button, a "Discover" button, and a "Headless crawl" button (run katana with a system Chromium so JS-rendered single-page-app routes enter the site map, on a worker thread relabelled "Crawling..." and mutually exclusive with a scan, content discovery, and the spec fetch, scope-gated, skipped with an install hint when the crawler is absent); (3) the "In scope" / "Out of scope" target-scope pattern lists that used to live in Settings (all persisted to settings on change), plus an "Import scope" button that loads a bug-bounty program's scope from a file (fissure_gui_sitemap_import_scope_file over the pure fissure_scopeimport parser: a HackerOne/Bugcrowd scope JSON, a scanner target-scope JSON, or a plain host list) and appends the normalized patterns to the allow/deny lists, deduped, offline (no live API), a "Seed recon" button, and a "Fetch spec" button that probes the target URL's origin for a served OpenAPI/Swagger definition (the well-known /openapi.json, /swagger.json, /v2/api-docs, ... paths) and seeds its operations into the inventory - run on a worker thread (relabelled "Fetching...", guarded against re-trigger and mutually exclusive with a scan or content discovery), scope-gated, with an OK-only outcome popup, and a "Log in" button that opens the session-action launcher seeded with this seed URL (authenticating is a step of scanning a target, so it belongs beside the scan controls rather than only inside the Session-handling rules popup); and (4) a status line with the role-compare buttons ("Snapshot role" / "Compare roles") and the flat/tree view toggle. Below them sit a scan-progress bar (N_GUI_PROGRESSBAR, shown only while a scan runs, capped to FISSURE_PROGRESS_W_BASE so it reads as a bar rather than a full-panel band), and a sortable
N_GUI_DATAGRID(#, method, status, source, URL). While a scan is active both the status line and the progress bar stay visibly alive: the status line shows live endpoint/audit/ finding counts with a 4-frame ASCII spinner, and the bar shows the audit-phase fraction ("Auditing n/total", clamped to 1.0 so the fill never overruns the track) once a total exists, or, during the crawl, when there is no count yet, an animated 0..1..0 sweep with a spinning "Crawling" marker and the running endpoint count (fissure_spinner: fissure_spinner_char / fissure_sweep_value, driven by al_get_time and the FISSURE_FPS redraw timer). Scan drives a FISSURE_SCAN (crawl then audit) on a background worker thread, so network I/O never freezes the UI: the crawl is single-threaded (the link frontier is sequential) and the audit phase fans out across a thread pool sized to the host's CPU core count (nilorea get_nb_cpu_cores). The crawl worker holds the scan lock across each page fetch (its inventory writes are interleaved with the fetch), so the GUI reads the stores with the NON-BLOCKING lock (fissure_scan_trylock): when the worker holds the lock the tick reuses the last-read counts and keeps the spinner/sweep animating from al_get_time, so the view never stalls behind a slow fetch and the endpoint grid and findings fill in whenever the lock is free. That is the rule for EVERY per-frame tick that touches the scan store, not only this one: the Plugins view's job reaper (fissure_gui_plugins_tick) merges a finished plugin job's findings under the same trylock and simply retries on the next frame when a scan holds it, since a plugin job is not mutually exclusive with a scan and a scan keeps that lock across multi-second probes. The Active toggle (off by default) gates the traffic-generating checks; "Seed from Proxy" folds the proxy capture history into the scan inventory. While a scan runs the Scan button relabels to "Stop scan" and pressing it signals the worker to stop, keeping whatever endpoints and findings were discovered so far. The per-request politeness delay is applied per audited endpoint and spread across the pool. A "Tree view" / "Flat view" toggle (next to the status line) switches the main area between the flat endpoint grid and a host/path tree: the tree is built by fissure_sitemap (a GUI-free model, unit-tested by test_sitemap) which groups the inventory by origin and decomposes each endpoint's path into nested segment nodes (so siblings share a parent), and is rendered with the n_gui tree widget (an origin root per host, sorted segments, endpoints annotated with their method and last status, interior nodes shown as directories). The tree shares the inventory and the scan lock with the grid, rebuilds on the same change trigger, and selecting an endpoint node seeds the URL field with its URL. A "Discover" button runs the built-in content-discovery pass (fissure_discover, unit-tested by test_discover): it brute-forces a wordlist of common paths under the URL-field base on a thread pool, calibrating the server's not-found response from an unlikely probe (so hard-404 and soft-404 servers are both handled) and recording any path that is not a transport error, not a 404, and not the baseline. It runs on a background worker (the button doubles as "Stop disc", an animated status line and sweep bar show it working, and the base host is scope-checked like a scan); the hits fold back into the inventory as endpoints tagged "discover" (the FISSURE_EP_SRC_DISCOVER source), refreshing the grid and tree. The View button cycles a third display, a custom-drawn site-map node graph (view mode 2): the host/path model (s_sitemap) drawn as coloured dots joined by edges, hosts in the accent colour and endpoints coloured by HTTP status, laid out left-to-right by depth. It draws at natural scale and the widget is sized to the SAME visible rectangle as the flat grid and the tree (not the whole-graph extent); the node field scrolls WITHIN the widget. Sizing the widget to the whole graph used to grow it past the view, which tripped the Target window's AUTO_SCROLLBAR and scrolled the entire view, so the URL / Depth / Scan / profile / status rows scrolled off the top and the operator lost the controls (the flat grid and tree never did this because they scroll internally). The graph now does the same: sitemap_graph_draw computes the content extent (the column prefix-sum width, the leaf-row height), reserves a scrollbar strip on whichever axis overflows, clips the nodes to the scrolling field below the fixed header, and offsets them by s_graph_scroll_x/y. The heading and column ruler are pinned to the top of the widget; only the node field scrolls. Scrolling is driven by the mouse wheel (vertical; Shift+wheel horizontal; Ctrl+wheel still spreads the columns), by drag-to-pan on empty field space, and by the two draggable in-widget scrollbars (graph_draw_scrollbars, the datagrid idiom); the scroll resets to the top-left when the focus changes. Scaling a big map to fit used to pack the rows tighter than the (unscaled) label text, so names ran into each other and drifted from their dots, and past a minimum scale the rest was clipped away with no way to reach it; scrolling at natural scale avoids both. Column widths are per depth, not one fixed width for all: fissure_graphcols measures every label at its depth in the live font and gives each column its widest label plus the node dot and a gap (clamped to [FISSURE_SITEMAP_GRAPH_COL_MIN_W, _MAX_W] so one absurd name cannot push the rest off-screen), then places nodes at the prefix sum of those widths. A single fixed column width truncated every longer name to the same stub, which is why most labels used to read "somethi.."; auto-fit shows them in full with no interaction at all. Labels are still truncated to their column, so a column the operator pinned narrower than its contents cannot overrun the node one column to its right. The solver is drawing-free (it takes measured text widths as numbers) and unit-tested in tests/test_graphcols.c. The operator can override the fit: a ruler strip under the graph heading carries a resize grip on each column's right edge (drag to pin that column, right-click a grip to return just that column to auto-fit), Ctrl+wheel over the graph spreads or compresses every column at once (FISSURE_SITEMAP_GRAPH_SPREAD_STEP per notch, clamped to [FISSURE_GRAPHCOLS_SCALE_MIN, _MAX]), and the "Fit columns" button on the Target status row drops every pinned width and the spread together. The spread and the pinned widths round-trip through the settings store (graph_cols, formatted as "spread|w0,w1,..." by fissure_graphcols_format), so a hand-tuned graph survives a restart, and they survive a site-map rebuild because only the measurements are re-taken. The heading, the ruler, and the hint line are drawn LAST, over an opaque band at the top of the widget, so the scrolling node field passes under them and the column resize handles stay reachable however far the field is scrolled. Double-clicking a node that has children focuses the graph on it (that node is redrawn as the root, so a deep map is read one subtree at a time and its labels have room); the focus is stored as a URL, not a node pointer, because a rebuild frees every node, and it is resolved by descending the tree by label, so a focus that no longer exists silently falls back to the whole map. There are two symmetric ways back to the full map: double-clicking the node the graph is already focused on (the focus root) toggles the focus off, mirroring the double-click that zoomed in, and the "Whole map" button (shown only while focused) clears it. While focused, the heading's interaction hint leads with the return gesture ("double-click the root ... to go back") rather than how to go deeper. Double-clicking a FINAL (leaf) node, which has no subtree to focus, instead loads its URL into the seed field (graph_seed_from_node) - the graph's equivalent of picking an endpoint in the tree, since the graph has no single-click select - so double-click always does something on every node. fissure_gui_sitemap_graph_set_focus is the testability seam behind --selftest-graph-focus. The View button names the CURRENT display ("View: Grid/Tree/Graph >") rather than the next one (which read as if that mode were already active) and cycles on click; the OS window title (set once per change in fissure_gui_main_build) also carries the active view and, for the Target view, its sub-mode ("Fissure - Target (Graph)"), so the mode is visible in the taskbar and window list. It is a custom-draw widget (n_gui_add_custom, drawn from the render thread, which is the only thread that touches s_sitemap) and a visual overview; the tree and flat grid stay for detail. The graph is also interactive: each drawn node records its on-screen hit box, so the render loop can show the full URL of the node under the pointer in a hover hint bubble, and a right-click on ANY node opens the shared cross-tool context menu (the same actions an endpoint row offers). A URL is resolved for every node, not just endpoints: graph_node_url walks the tree from the roots, so an endpoint uses its own URL, a host root uses its origin (the root label), and a directory uses its origin plus the path segments down to it. Because a custom widget has no native mouse hooks, fissure_gui_sitemap_graph_event is called from the main event loop before n_gui_process_event: it tracks the pointer for the hint, runs the column drag, the Ctrl+wheel spread and the double-click focus, and consumes a node right-click to open the menu (returning 1 so the click does not also reach the widgets; a wheel notch without Ctrl, and a click that is not on a grip or a node, are deliberately NOT consumed so the view keeps scrolling normally). The node pointers are re-recorded every draw and only ever touched on the render thread, so they stay valid between frames. The graph widget deliberately carries NO n_gui tooltip: its own hover hint (the node URL bubble) is its hint, and a tooltip bubble would be drawn over it. The View button that reaches the graph carries the descriptive tooltip instead.Scanning (no separate view). There is no Scanner view: the scan is launched, configured and followed from the Target view (item 3: URL, depth, Active / Aggressive toggles, Scan / Quick scan, live progress), with the custom scan-options popup (fissure_gui_scanopts, section 1.6a) for hand-picking check families and insertion points, and findings stream into the Findings view (item 5) as they are discovered. See 05_WEBSITE_SCANNER.md.
Findings. A severity grid (a selection marker, #, severity, triage, category, title, location) with per-severity tallies and a detail pane (description, evidence, CWE/OWASP, remediation, triage, notes, tags). Reads the current scan's findings store (fissure_gui_sitemap_findings) live, so findings appear as the scan progresses. The store is materialized on the view's first tick (fissure_gui_sitemap_ensure_findings), so the persisted per-project findings load and show on startup rather than only after a scan is launched. A "Find" button on the top action row opens the in-message find on the detail pane (the same action as Ctrl+F, repeated with Ctrl+G), so the evidence and the captured exchange can be searched from a visible control and not only from a key. Global Search reveals a finding here through fissure_gui_findings_reveal: it selects the row whose "#" cell is the finding's stable store index (never a display position, since a header sort physically reorders the rows), scrolls to it and fires the grid's own select callback so the detail pane loads; when the filter bar hides that row the whole filter bar (text/query, triage, minimum severity, scope) is cleared and the reason is stated in the status line and in an info popup, and a finding the store no longer holds is reported the same way instead of switching views. A triage bar acts on the focused finding: a one-click button cycles its state (open -> confirmed -> false-positive -> ignored) and inline editors set its notes and tags; all three persist with the session. A filter bar narrows the grid by a case-insensitive text search (over title/location/category/tags/notes), a triage-state cycle, and a minimum-severity cycle (fissure_findings_filter_match), with the status line reporting "N of M shown". A group-action bar acts on a multi-selection. The grid uses n_gui's native datagrid multi-selection (n_gui_datagrid_set_multiselect): a plain click selects one finding, Ctrl-click toggles a row, and Shift-click selects a range, and the selected rows are highlighted. On every click the native selection is mirrored (sync_sel_from_grid) into a stable selection bitmap keyed by the 1-based store index (so it survives the grid's frequent rebuilds and any header sort, which clears the native selection), and the leading marker column shows "[x]" for a selected row and "[ ]" otherwise; the rebuild reapplies the native selection from that bitmap. "Sel" still toggles the focused row, "All" selects every finding matching the current filter, and "None" clears it ("Sel: N" shows the count). Every per-finding action runs over the whole selection: "Triage sel" (and the Triage button) sets every selected finding to the focused finding's triage (the focus is the template); the Highlight button cycles the manual row color and, with a multi-selection, applies it to all selected; the group-tag field plus "Tag sel" appends a shared group/tag name to each (fissure_finding_add_tag, deduping); "Note sel" appends the Notes-editor text as a new line to each; "To Organizer" stashes every selected finding for later; "Push to PwnDoc" pushes only the selection (via a transient borrowed-view store, fissure_findings_view_add) instead of the whole store; "Send to Repeater" opens each selected finding as its own tab in a "Findings" collection (fissure_gui_repeater_add_collection); and right-clicking inside the selection raises the cross-tool request actions over every selected finding's request at once (fissure_gui_ctxmenu_open_multi). With no selection these fall back to the focused finding / whole store. Two destructive actions remove findings, both confirmation-gated and refused while a scan runs: "Delete sel" removes the selected findings (fissure_findings_delete_mask) and "Clear all" removes every finding for the active project (fissure_findings_clear); each clears in memory and the sitemap tick then overwrites findings.ndjson, so the change survives a restart. A detail-pane selection navigator ("< Prev", a "k / N" position label, "Next >") sits above the detail pane and is enabled only when two or more findings are selected: it steps the detail view through the selection in display order (wrapping), marking the current finding "[>]" in the grid (distinct from the "[x]" of the other selected rows) and scrolling the list so it stays in view, without changing which findings are selected. Implemented in fissure_gui_findings.
Repeater. A Hook-style request editor (method + URL + headers/body) plus a response viewer, for hand-crafting and replaying requests against a target. It holds many request workspaces ("tabs"), not one: a left pane lists every tab grouped by collection (the same grouping the Organizer uses, named groups first, default last) and clicking a row makes that tab active and loads it into the editor; New/Dup/Del manage them and a name + collection field rename and regroup the active tab. The tab set is the testable, Allegro-free FISSURE_REPEATER_TABS model (fissure_repeater_tabs); the active tab binds to the editors (its request is saved back on switch/send) and the grouped list is built with the Organizer's sorted-view + row->store-index map. "Send to Repeater" from the Proxy/Findings/Organizer (and set_url/set_request) reuses a blank tab or opens a new one, so successive sends stack up as tabs. Each tab also keeps a send history: every completed send records the request that was sent plus its response/status/timing (capped at FISSURE_REPEATER_HISTORY_MAX, oldest dropped), and a "< send M/N >" control above the response pane steps back and forward through prior exchanges, loading each into the editors and response pane so you can see how an edit changed the result; the record is appended to the tab that started the send even if you switch tabs while it runs. For multipart/form-data bodies, "MP inspect" parses the body (boundary taken from the Content-Type header) and lists the parts in the response pane, and "MP repack" rebuilds the body with clean framing (fissure's n_http_parse_multipart / n_http_build_multipart). A persistent session cookie jar (nilorea N_COOKIE_JAR) is shared across sends: the engine replays the jar's matching cookies on each request (unless the user set their own Cookie header) and absorbs every Set-Cookie from the response, so a login send carries over to later authenticated requests. The "Session: N cookies" indicator shows the jar size and "Clear cookies" empties it. "Run macro" is the session-handling rule: it replays the Settings-configured Login config (a recorded request sequence, a FISSURE_LOGIN, doubling as a macro) on a worker thread via fissure_login_run_capture, which refreshes the shared session jar and captures the variables its steps extract (a fresh CSRF token, a bearer value); on completion it substitutes those tokens into the request editors with fissure_macro_substitute (a known {{name}} becomes the captured value, an unknown {{name}} is left verbatim so the Environment expansion still applies), so automated replays carry a current token instead of a stale one. The button is disabled and the status line shows "Running session macro" while it runs; failures report on the status line. The pure fissure_macro_substitute and the fissure_login_run_capture flow are tested by test_macro. The response pane has four views, picked by a selector next to the history nav: Highlighted (an HTTP-syntax-highlighted N_GUI_SYNTAXVIEW, the default; a display mode only, distinct from the Prettify button that re-indents the body), Raw (the editable textarea, for selecting/copying), Hex (an N_GUI_HEXVIEW), and Rendered (a plain N_GUI_SYNTAXVIEW showing the HTML body as readable text). The four share one rectangle and visibility selects which shows; every response (a send, a history step, or an MP inspect dump) fills all four through set_response_views. The Rendered view goes through fissure_htmlview_render (tested by test_htmlview): it splits the header block from the body, and when the body is HTML (a Content-Type mentions html, or the body opens with a tag) renders it with the Nilorea n_html_to_text helper (tags dropped, script/style skipped, entities decoded, blocks line-broken), otherwise it shows a note pointing to the other views. The assembled response text uses standard HTTP framing (status line, headers, a blank line, then the body) so this split is unambiguous. The "Inspector" button (session row) opens the structured request editor (fissure_gui_inspector, a titled POPUP over the pure fissure_inspect model): it decomposes the current request into editable sections (headers, query params, cookies parsed out of the Cookie header, and x-www-form-urlencoded body params), shown in a section selector plus a name/value grid with name/value edit fields and Add/Update/ Remove. On Apply it rebuilds the URL, header block, and body (query and body values are decoded for editing and re-encoded on rebuild; header and cookie values are kept raw) and writes them back into the editors. The Inspector takes a caller-supplied apply callback, so the Proxy intercept editor can reuse the same popup against the raw in-flight request.
A "From cURL" button beside Stash and Send loads a browser's Copy as cURL paste into the tab: its method, URL, headers and body (fissure_curlimport, which reads the shapes the browsers emit and ignores the transport switches). Copying a request out of a network tab is how an operator gets a REAL, already authenticated request into the tool, session cookie and CSRF header included, and it is far more accurate than reconstructing one from the crawl.
Plugins. A resizable tool popup (Config category, default F7) rather than a work-area view, so a long-running tool stays reachable over whatever view is in front. A draggable divider splits the plugin list from the tabbed output pane, and both reflow with the window; the divider position and the window size persist. Manage and run external tools / scripts; configure command lines, capture stdout/stderr, surface results back as findings. Each run's output opens a tab in a paged output pane (a sliding window of tab buttons with Prev/Next and an "n-m/total" count); the active tab's text fills a shared output box. "Add to report" turns the active tab's output into an Info finding, and "Close" deletes the active output tab (shifting the rest down). "Recon all" runs every installed recon-category tool against the target URL in one action and seeds their combined output into the site map (one-at-a-time is skipped); it is guarded against re-trigger while it runs and reports the outcome in a popup. "Install all" installs every missing tool at once.
Report preview. Rendered preview of the report before export, with a format selector (HTML/Markdown/JSON/SARIF/CSV/Issue XML/PDF) and an "FP/ignored: shown|hidden" toggle that drops findings triaged false-positive or ignored from the rendered model. Triage state, notes, and tags are surfaced in every format. See 06_REPORTING.md.
Multitool. A CyberChef-lite workbench (default F9), implemented in fissure_gui_multitool over the GUI-free fissure_multitool core. It is a resizable tool popup rather than a work-area view, so it stays available over whatever view the operator is working in; its editors reflow with the window and its size persists. An editable input area, a transform selector (base64 / base64url / URL / hex / zlib encode-decode, MD5/SHA-1/SHA-256/SHA-512 digests, Protobuf/gRPC decode, Prettify (JSON/XML/JS), and the WAF-bypass encoders: alternating case, space to comment, double URL-encode, JSON body padding) applied with Apply, a read-only output area, and an "Output to input" button to chain transforms. Smart decode (fissure_multitool_smart_decode) auto-detects and recursively peels an encoding chain: it repeatedly recognizes the outermost layer (zlib blob, percent/URL, hex, base64 or base64url) and decodes it, stopping when no further layer is recognized, the result is not plausibly text (nor another decodable binary layer), or the layer cap is reached. Each accepted layer must strictly change the data and yield a printable result (or a further-decodable binary layer such as a zlib blob), which keeps plain text and short ambiguous tokens from being over-decoded; the status line reports the detected chain (for example "base64 decode -> hex decode"). It is a best-effort heuristic and can be wrong on ambiguous input. Decode JWT splits and pretty-prints a token and flags alg:none and the HMAC algorithms; Crack JWT (HS256) recovers the secret from a chosen wordlist file offline; Identify hash guesses the type by length and charset. A script editor plus a "Run script" button apply a user JavaScript convert transform to the input via the QuickJS host (fissure_js_transform): the input is exposed as the global
inputand the script either returns a value (an expression like input.toUpperCase()) or defines transform(input); the engine has memory and stack limits and a wall-clock deadline (an interrupt handler aborts a runaway loop so the GUI cannot hang). The transform is unit-tested (test_checks_js test_transform). The user-scripting surface is now general: besides this Multitool convert transform and the Intruder Script payload-processing step, the same QuickJS checks run as passive hooks on live proxy traffic (the Proxy view runs every user script under resources/checks against each newly captured exchange, merging findings via fissure_userscripts_run_passive; see section on the Proxy view) and as context-menu active scripts (the "Run scripts" action, see 4.2.1.1). See 05_WEBSITE_SCANNER.md section 11. An "Expand tags" button previews the inline-tag expansion of the input.Inline transform tags (Hackvertor-style), fissure_tags. A request part wrapped in
<@name>...<@/name>(or a self-closing<@name/>generator) is transformed at send time, innermost-first so tags nest (<@base64><@upper>hi<@/upper><@/base64>). The pure engine (fissure_tags, test_tags) provides built-ins that reuse the multitool transforms (base64/base64url/url/hex/zlib and theird_decoders, md5/sha1/sha256/sha512), an HMAC (hmac_sha256(key)), case folding, generators (timestamp,date(fmt),random(n),random_int(a,b)), an out-of-band canary (oast, minted from the running OAST listener), and persisted global variables (get(name)/set(name)). Custom named tags run a user JavaScript body (the tag content isinput) through the QuickJS engine; evaluation is serialized by a mutex (the Intruder evaluates on many threads) and bounded by a nesting-depth and output-size cap. The Repeater evaluates tags after{{variable}}expansion; the Intruder evaluates each generated request after payload substitution (fissure_intruder_run's preprocess hook) so generators and encoders are fresh per request. The Tags toolbar popup (fissure_gui_tags) manages the custom tags and variables, persisted to<config>/tags.jsonand loaded at startup. Unknown or malformed tags pass through unchanged.Intruder. A payload-fuzzing workbench (default F10), implemented in fissure_gui_intruder over the GUI-free fissure_intruder core. A URL-template field (mark each payload position by wrapping it in a backtick), an attack mode selector (sniper / battering ram / pitchfork / clusterbomb), a payload input whose interpretation is chosen by a payload-type combobox, and a sortable results datagrid (#, request, status, length, time). The payload types are: List (one literal payload per line), Numbers ("start stop step" range), Null (a count of empty payloads), Wordlist file (a path read one payload per line), Dates ("start count step [fmt]", a strftime-formatted sequence from a YYYY-MM-DD start), Charset ("set minlen maxlen", a brute-force odometer over the alphabet), Case-mod (a base word expanded into its case variants), and Script (a QuickJS generator that programmatically produces the payloads: the script's return value is split on newlines into one payload per line, the scriptable attack driver / Turbo Intruder generator). Each type maps to a fissure_intruder_gen_* generator (gen_numbers / gen_null / gen_from_file / gen_dates / gen_charset / gen_case_mod / gen_script), all bounded by FISSURE_INTRUDER_MAX_REQUESTS; the Script type runs in a lazily-created QuickJS engine shared by the tab. Selecting a type shows its expected input format in the status line. A "Position" selector lets each marked position carry its own payload set and type for the pitchfork and clusterbomb modes: it lists one entry per backtick-marked position (rebuilt live as the URL is edited, capped at FISSURE_INTRUDER_MAX_POSITIONS), and switching it swaps the editor between per-position slots. Slot 0 is the shared set: sniper and battering ram always use it, and any per-position slot left empty falls back to it, so a single filled set behaves exactly as before. The mapping is resolved by the pure, tested fissure_intruder_resolve_sets (shared-set fallback plus a collapse-to-one rule). A "Process pipeline..." button opens the payload-processing editor (see the Payload processing popup below): an ordered list of steps applied to every payload before it is sent. A "Rate" row carries three per-attack controls (per-attack resource pooling / rate-limit avoidance): Threads (overrides the Settings concurrency default; blank keeps it), Delay ms (a throttle inserted between request launches, also used as the backoff between retries), and Retries (extra attempts on a retryable outcome: a transport error or a 429/503 status). The attack runs on a background worker over fissure_intruder_run, which fans out across an n_thread_pool, spacing launches by the delay and retrying per attempt; each result carries the retry count it spent, shown in the Status cell as "200 (r2)" when non-zero. All three are clamped (FISSURE_INTRUDER_THREADS_MAX / _DELAY_MAX_MS / _RETRIES_MAX) and the sleep is cancellation-aware so Stop stays responsive. The Start button doubles as Stop. A "Mine params" button reuses the same inputs to run the parameter miner (fissure_paramminer): the payload list becomes the candidate parameter-name wordlist and the discovered names land in the grid with their reason. A "Config" row saves and reloads the whole attack: a name field, a combobox of saved configs, and Save / Load / Delete. Save snapshots the template, mode, every position's payload text and type, the grep rules, the rate controls, and the payload-processing pipeline into fissure_attackcfg and writes it as attacks/
.json under the active project (so configs travel with the project and switch with it); Load repopulates all the widgets and rebuilds the pipeline (fissure_gui_pp_refresh); Delete removes the file. Names are validated against path traversal. The config round-trip is unit-tested (test_attackcfg). See 04_NETWORK_AND_PROXY.md section 7.2 and 05_WEBSITE_SCANNER.md section 11. Settings. Proxy listener config, CA cert install/export, TLS options, themes, UI scale (Small/Normal/Large/Huge), history limits, plugin paths.
Organizer (popup). A save-for-later queue (toolbar "Organizer" button, fissure_gui_organizer) over the app-owned FISSURE_ORGANIZER store. It lists stashed requests (collection / method / URL / tags) grouped by collection (named groups first, the default/ungrouped items last), edits the selected item's collection, notes, and tags, removes one, and loads one back into the Repeater (splitting the stored raw request into headers and body). The grid is sorted into collection groups while the store keeps insertion order, so a per-row map (s_view) resolves a grouped row back to its store index. Editing the Collection field (blank means the default group) regroups the grid live. The Proxy and Findings views stash a request with a "To Organizer" button and the Repeater with "Stash" (fissure_gui_repeater_current_request assembles the editors into a raw request); the queue persists to
/organizer.json on every change. Follows the shared popup lifecycle. Environments (popup). The reusable-variable editor (toolbar "Env" button, fissure_gui_env) over the app-owned FISSURE_ENV set (fissure_env). It holds several named environments (e.g. prod, staging), each a map of {{name}} -> value (base URLs, tokens, credentials), with one active. The combobox selects the active environment; the Name field plus Add / Rename / Delete manage the set (Delete routes through the shared confirm dialog naming the target, and the last environment cannot be removed); the variable grid (Key / Value) plus the Key/Value fields and Set / Remove variable edit the active environment's variables. Every change persists to
/environments.json. The Repeater (URL, headers, and body), the scan seed, and the Intruder URL template expand {{name}} against the active environment at send time (fissure_env_expand), so a request authored with {{baseUrl}} and {{token}} works across environments without editing it; an undefined reference is left literal so the gap is visible (it never blanks). The core (fissure_env_*) is pure and covered by test_env. Also reachable from the command palette. Follows the shared popup lifecycle. OAST (popup). The out-of-band callback console (toolbar "OAST" button, fissure_gui_oast) over a FISSURE_OAST listener (fissure_oast). Start/Stop binds a loopback HTTP listener (default port FISSURE_OAST_DEFAULT_PORT); "Mint payload" produces a unique payload URL (http://addr:port/
) to paste into an SSRF/XXE/command-injection probe, and the grid lists every callback that comes back (time / method / path / source). The listener and its interaction store are the testable, Allegro-free module; the popup's per-frame tick (run regardless of whether the popup is open) turns each new interaction into a high-severity, certain "Out-of-Band Interaction" finding (deduped per token+path) so a blind callback is correlated into the findings store. The listener keeps running across a GUI rebuild and is stopped/freed at teardown. Use only against authorized targets. Follows the shared popup lifecycle. Match and replace (popup). The rule editor (toolbar "Rules" button, fissure_gui_matchrep) over the app-owned FISSURE_MATCHREP ruleset. It lists the rules (on/leg/host/match/replace), edits the selected rule's fields with the change written back and persisted to
/matchrep.json immediately, adds and removes rules, and tests the ruleset against a pasted sample (choosing the leg and an optional host). Edits apply to the running proxy live: the ruleset carries a mutex so the editor can mutate rules while the proxy worker threads apply them (fissure_matchrep_at/set/set_enabled/set_regex/remove and apply all lock). The same ruleset is applied to the scan engine: the Target view points the scan transport's matchrep at the app ruleset (FISSURE_CONFIG.matchrep), and fissure_request_execute rewrites each scan request and response through it (the ruleset's lock keeps live edits safe against the scan workers), so scans see the same rewrites as the proxy. Each rule is literal/binary-safe by default; a per-rule Regex toggle switches it to regex match/replace via the Nilorea helper npcre_replace (the replace template uses $1, $2 capture-group references), shown as the grid "Re" column and persisted as a "regex" flag in matchrep.json. Follows the shared popup lifecycle. Comparer (popup). A two-pane diff workbench (toolbar "Comparer" button, fissure_gui_comparer) over the GUI-free fissure_diff core. Two editable, side-by-side panes (A and B) hold any two values (paste a response, a token, a parameter); a granularity selector picks Line (fissure_diff_text), Word (fissure_diff_words, whitespace-tokenized) or Byte (fissure_diff_bytes, a hex diff of the differing middle), and Compare renders the prefix/suffix-anchored diff into a result pane. Swap exchanges A and B; Clear empties both. Unlike the Proxy pin-and-diff (which diffs captured flows at line granularity), the Comparer compares arbitrary pasted values at any of the three granularities, and fissure_gui_comparer_load lets another view push a captured value into a pane. All three diff modes are pure and covered by test_diff. Follows the shared popup lifecycle.
Payload processing (popup). The Intruder payload-processing pipeline editor (Intruder "Process pipeline..." button, fissure_gui_pp) over an app-lifetime FISSURE_PP_PIPELINE owned by the popup. The pipeline is an ordered list of steps applied to every payload before it is sent: Prefix, Suffix, Match-replace (literal, all occurrences), Transform (any multitool transform: URL/base64/ base64url/hex/zlib encode-decode and MD5/SHA digests), Skip-if (drop the payload when an arg regex matches it), Regex-replace (substitute regex matches via npcre_replace, with $1, $2 capture-group references), and Script (a user JavaScript convert transform run per payload through the QuickJS host, fissure_js_transform: the payload is the global
input, the script returns a value or defines transform(input), with a wall-clock timeout; the pipeline owns a lazily created engine). The editor lists the steps in a grid, adds a step from a kind selector plus two argument fields and a transform selector, reorders (Move up) / removes / clears the selected step, and tests the pipeline against a pasted sample. The Intruder reads the pipeline via fissure_gui_pp_pipeline and applies it to each payload set at attack start with fissure_pp_apply; the core (fissure_pp_*) is pure and covered by test_intruder. Follows the shared popup lifecycle.Search (popup). The global query console (toolbar "Search" button, fissure_gui_search) over the Nilorea query language (n_query). A query is compiled once and evaluated against every proxy flow and every finding through a per-record field getter, so each record exposes its own fields: flows expose host / method / path / url / status / mime, findings expose title / severity / location / category / host. The language supports comparisons (= != ~ !~ for equality/contains, =~ for regex, > < >= <= for numeric fields), AND / OR / NOT with parentheses, and bareword or quoted values; a parse error is shown in the status line. Matches are listed with their source (Proxy / Finding), a detail summary, and the URL or location, capped at FISSURE_SEARCH_MAX_RESULTS (the cap is reported when hit). The result list is live: typing in the query box re-runs the search, so the list filters as you type; a query that does not parse yet is reported as incomplete and the last results are kept, and a query mentioning
bodywaits for the Search button because it reads every captured response. The live pass reads the findings store with the non-blocking lock and says so when a running scan holds it, so a keystroke never stalls behind a crawl-phase fetch; the Search button takes the blocking lock and always includes the findings. A result is a link, not a line of text: picking a row, or selecting it and pressing "Go to", hands the record to the owning view's reveal entry point (fissure_gui_proxy_reveal_flow for a flow, fissure_gui_findings_reveal for a finding), which switches to that view, selects the record, scrolls to it and loads its detail, and closes the popup. Each row carries the record's identity (the 1-based store index, matching the "#" column of the owning view's grid) in a hidden column, so the jump survives a header sort; when the owning view's own filter bar hides the record, that view clears its filter bar and says so (status line plus an info popup) rather than leaving the operator on a view that appears not to hold their hit, and a record that is no longer in the owning store is reported the same way instead of switching views. The popup does not walk the destination window's widget list to find its grid: each view owns its reveal. The query engine is reusable infrastructure and is unit-tested in Nilorea (ex_query). Follows the shared popup lifecycle.Sequencer (popup). The token-randomness analyzer (toolbar "Sequencer" button, fissure_gui_sequencer). The user pastes a sample of tokens (one per line: session cookies, CSRF tokens, reset tokens); Analyze concatenates the non-blank lines into one byte sample and reports, via the Nilorea n_entropy module, the Shannon entropy (bits/byte), the monobit bit balance, a chi-square byte- uniformity statistic, the effective bits of entropy per token (Shannon x average token length), and a qualitative verdict (strong / moderate / weak). The randomness math is reusable infrastructure unit-tested in Nilorea (ex_entropy). Capture harvests the sample instead of pasting it: a URL, the token source (cookie / header / JSON field / regex), the name, and how many to collect. That is up to FISSURE_SEQ_MAX_CAPTURE requests, so it runs on a worker thread and never on the GUI thread: the Capture button becomes "Stop" (a second press ends the run after the request in flight and analyzes what was collected), a progress bar beside Analyze shows "collected / requested", and the status line carries the live count plus a spinner. fissure_gui_sequencer_tick, called once per frame from the main build, animates that indicator and, when the worker finishes, fills the sample pane, analyzes it, and restores the button. Authorized targets only. Follows the shared popup lifecycle.
CSRF PoC (popup). The cross-site-request-forgery proof-of-concept viewer (fissure_gui_csrf), opened from the context menu's "CSRF PoC" action with a captured request. It generates the PoC HTML with the pure, tested fissure_csrf_poc (a GET or x-www-form-urlencoded POST becomes an auto-submitting form with a hidden input per parameter; any other body becomes a credentialed fetch()), shows it in a read pane, and saves it to a file path. Parameter names/values are percent-decoded then HTML-escaped and the fetch body is JS-escaped. Authorized targets only. Follows the shared popup lifecycle.
20a. Clickjack PoC (popup). The clickjacking (UI-redress) proof-of-concept viewer (fissure_gui_clickjack), opened from the context menu's "Clickjack PoC" action with a target URL. It generates the framing page with the pure, tested fissure_clickjack_poc (a low-opacity iframe of the target under a decoy, with an opacity slider to align the decoy and a note that X-Frame-Options / CSP frame-ancestors defeats the attack), shows it in an editable pane with a decoy-label field and a Regenerate button, and saves it to a file path. The URL and decoy are HTML-escaped. Authorized targets only. Follows the shared popup lifecycle (selftest flag --selftest-clickjack).
20b. AI assistant (popup). An optional LLM helper (fissure_gui_ai over the pure, tested fissure_ai core), opened from the context menu's "AI assist" action with a dump of the row's request. A task selector (Explain request / Triage finding / Draft PoC), an editable input pane, a Run button, and a read pane for the answer. Run snapshots the input and the Settings AI config (API key, model, endpoint) and calls the provider on a worker thread (fissure_ai_run posts an Anthropic Messages-shaped request through the transport engine); the popup's per-frame tick reaps the result into the answer pane, and the button disables while it runs with an "Asking the assistant" status that carries an animated spinner, so a slow or hung endpoint reads as working rather than frozen. Requires an API key in Settings (the AI assistant section); it sends the provided input to the configured third-party endpoint, so it is opt-in and off until a key is set. Follows the shared popup lifecycle (selftest flag --selftest-ai).
Command palette (popup). A launcher opened two ways: Ctrl+K, and clicking the Fissure title button at the top-left of the toolbar (the palette is itself an interface, so it must have a discoverable clickable control, not only a shortcut). A query field filters a static action registry by a case-insensitive label substring; the matches fill a grid and selecting one closes the palette and runs the action. Palette parity is an enforced rule (CLAUDE.md): every view and every standalone popup has an entry, so the registry covers all seven view switches and every tool popup (Organizer, Environments, Projects, OAST, Match-and-replace rules, Comparer, Search, Logger, Sequencer, Intruder payload pipeline, SAML, Tokens, HaE, Tags, Session rules, Auto-replay, Team, AI chat, Workflows, Schedules, Extensions, message editor, the Fissure Browser launch, the Authorization matrix, grid columns, toolbar reorder, Settings, Keyboard shortcuts, Help). A purely request-contextual action that needs a selected request (AI assist, CSRF/Clickjack PoC, Add to collection) is exempt and stays a context-menu action. The palette opens with the query focused. Follows the shared popup lifecycle.
Projects (popup). The named-workspace switcher (toolbar "Project" button, fissure_gui_project) over the fissure_project manager (a GUI-free core, unit- tested by test_project). Each project is a directory under "
/projects/ /" holding one engagement's per-project data; one is active (persisted in " /active_project") and the data-persistence paths resolve under it: the Organizer, Environments, match-and-replace rules, the proxy capture history, the Repeater tab collections (fissure_repeater_tabs_cfg), the scan findings (findings.ndjson via fissure_session), the endpoint inventory (inventory.ndjson via fissure_inventory_save/load, restoring the Targets host list and the Target grid), and the saved attack configs (fissure_attackcfg), while global preferences (theme, UI, shortcuts, inline tags, HaE rules, column layouts, and the CA in the config root so it is not re-installed per project) stay shared. The scan store is materialized once at startup so the active project's findings and inventory show on the first frame. The popup lists projects in a combobox, Creates one from a validated name (letters, digits,
- _ .; the default project is always present and protected, as is the active one), Switches the active project (a hot-switch: it reloads the Organizer, Environments, rules, Repeater collections, and Intruder attack configs in place, reloads the scan findings and inventory and the proxy history when those are idle, and clears the proxy flow grid and the findings selection so nothing lingers from the previous project; a running scan or proxy keeps its data until it stops), Duplicates the selected project into a new name (a backup that Switch recovers), and Deletes a non-active project through the shared confirm dialog. Reachable from the command palette ("Open Projects"). Follows the shared popup lifecycle.
4.2.1 Keyboard shortcuts
The toolbar view buttons carry remappable keyboard shortcuts (default
F2..F10 for Dashboard..Intruder in toolbar order; F7 opens the Plugins
popup and F9 the Multitool popup, the other seven switch views), backed
by the fissure_shortcuts model and bound to the buttons via
n_gui_button_set_keycode. The "Edit keyboard shortcuts" button in
Settings > Appearance opens the shortcut editor popup
(fissure_gui_shortcuts), a titled POPUP listing each action with its
current key: clicking an action's key button arms it to capture the next
key press (routed from the main loop through
fissure_gui_shortcuts_capture_key), with conflict detection against the
other bindings, a reset-to-defaults action, and immediate persistence to
4.2.1.1 Right-click context menus
Right-clicking a row in the Proxy, Findings, or Target grid raises a
shared context menu (fissure_gui_ctxmenu, a frameless POPUP positioned
at the cursor) with the cross-tool actions that apply to that row: Send
to Repeater, Send to Intruder, Add host to scope, Scan this, CSRF PoC,
Clickjack PoC, AI assist, and (where the request's headers are
available, i.e. the Proxy and Findings grids) Check access control and
Run scripts. Check access control replays the request under the
Settings-configured low-privilege identity and with credentials
stripped, diffs the responses against the authenticated baseline
(fissure_authz_check on a Findings-view worker thread), and raises a
broken-access-control / IDOR or missing-authentication finding when a
replay is served the same content; the verdict is shown as a popup. Run
scripts loads the user scripts under resources/checks, fetches the
selected request once to obtain a response, then runs every script
through the active scriptable-check path (its fs.send() may probe
further) on a Findings-view worker thread and merges the reported
findings into the Findings store with deduplication; a spinner status
line shows progress and a popup reports how many scripts ran and how
many findings were new (fissure_gui_findings_run_scripts). The menu also
carries the targeted active-probe actions, each run on a Findings-view
worker thread with a spinner and an outcome popup (authorized, in-scope
targets only): Request smuggling, Test for IDOR, Test cache poisoning,
Subdomain takeover, Prototype pollution (probes the row's URL for
server-side prototype pollution via
fissure_gui_findings_check_protopollution, and is offered only for a
body-bearing method since the gadget travels in a JSON request body),
Mass assignment / HPP (probes the row for mass assignment - privileged
fields autobound from the request body - and HTTP parameter pollution on
the query, via fissure_gui_findings_check_massassign), and Stored XSS
(writes a unique executable canary through the request, re-reads the
page, and flags stored XSS when the canary comes back unencoded, via
fissure_gui_findings_check_storedxss, offered only for a body-bearing
method), and Test file upload (submits the malicious upload variants to
the row's URL and confirms any the server stores and serves back,
CWE-434, via fissure_gui_findings_check_upload, which calls the same
fissure_checks_upload probe as the control-API POST /api/upload route).
The right-click itself is provided by the Nilorea datagrid:
n_gui_datagrid_set_on_context registers a callback that selects the
clicked row and reports the cursor position; each grid resolves the row
to a request (Proxy assembles the captured flow, Findings resolves the
finding's capture or http location, Target reads the endpoint's
method/URL cells) and opens the menu with the applicable action bitmask.
The actions dispatch to the existing per-tool entry points:
fissure_gui_repeater_set_request, fissure_gui_intruder_load,
fissure_gui_sitemap_add_scope_host (deduping via
fissure_scope_text_contains and persisting to the per-project scope),
and fissure_gui_sitemap_scan_url (which reuses the active-scan
confirmation). Choosing an action runs it and closes the menu; Escape
also closes it. The command palette (fissure_gui_palette,
Ctrl+K) derives its view/popup entries from the shared module registry
(the toolbar's k_modules in fissure_gui_main.c, exposed via
fissure_gui_palette_module_count / _label /
_run), so that registry is the single source of truth for
what the palette can open: adding a module there automatically gives it
a palette entry, with no parallel palette table to keep in sync. Only a
handful of palette-only popups that are not toolbar modules (the
Intruder payload pipeline, grid-column and toolbar customizers, the
extension message editor, the authorization matrix, and the
keyboard-shortcuts help) are declared locally in the palette. The
palette dispatches a popup with its OPEN function (never the toolbar's
toggle), so picking an already-open popup from the palette leaves it
open. The request context menu stays a separate surface: its actions are
request-contextual (they need a selected request), a different concern
from the palette's view/popup openers, so they are not folded into the
same registry.
The Target grid is multi-select (n_gui_datagrid_set_multiselect: Ctrl-click toggles a row, Shift-click selects a range, a right-click inside the selection keeps it). on_endpoint_context reads every selected row (n_gui_datagrid_get_selected_rows) and opens the menu via fissure_gui_ctxmenu_open_multi. With more than one row selected the single-request actions (Send to Intruder, CSRF PoC) are hidden and the rest act on the whole selection: Send to Repeater opens a tab per endpoint in a shared "target" collection (fissure_gui_repeater_add_collection) so they can be group-sent, Add host to scope adds every host at once (fissure_gui_sitemap_add_scope_hosts), and Scan this audits exactly the selected endpoints with no crawl (fissure_gui_sitemap_scan_targets -> fissure_scan_start_targets), honoring the Active/Aggressive toggles and the active-scan confirmation. "Scan this" is a no-crawl targeted audit even for a single row (it does not launch a full crawl from the URL). Scan with profile is a dropdown of scan profiles next to it: picking a profile applies that profile's options to the Target view (as the profile picker does) and then scans the selection with it (fissure_gui_sitemap_scan_targets_with_profile), so "Scan this" uses the current options and "Scan with profile" runs a dedicated profile-driven scan. The profile dropdown's panel is drawn as a global overlay, so it works inside the popup menu.
4.2.2 In-app help
F1 (anywhere) and a toolbar "Help" button open the help popup (fissure_gui_help), a titled POPUP with a wrapping row of topic buttons over a read-only multi-line text area (Sketchr-style). Clicking a topic recomposes the text pane to just that subject's sections (Overview, Proxy, Scanning, Repeater/Intruder, Findings/Report, Auth/Access, Workshops, Plugins, Extensions, Automation, Team, Workspace), so the reference is browsable by subject rather than one long scroll. The topics map to section headers in the static k_help[] reference (overview, views, proxy, scanning incl. the safe/aggressive toggle, scope, repeater, reporting, safety, ...); the final "Shortcuts" topic is a live "Keyboard shortcuts" pane generated from the fissure_shortcuts store, so it always shows the current bindings (the key labels come from the shared fissure_gui_key_label, the same formatter the shortcut editor uses). F1 toggles it; Escape closes it.
4.2.3 Persisted window layout
Window and popup positions persist across sessions through nilorea
n_gui's layout I/O (n_gui_save_layout_json / n_gui_load_layout_json,
enabled by the HAVE_CJSON build flag). main.c loads
4.2.4 Settings popup
A toolbar "Settings" button opens the settings editor
(fissure_gui_settings), a titled POPUP backed by the persisted
FISSURE_SETTINGS store (<config>/settings.json,
loaded at startup before the scale is computed so the saved theme, font
and interface size apply from the first frame). It exposes: a Theme
combobox (switches live via fissure_gui_theme_apply_theme, which bumps
the theme generation; the main loop's per-frame build notices the change
and calls n_gui_reset_all_widget_themes so existing widgets repaint to
the new palette without a restart, n_gui_set_default_theme alone only
colors widgets created afterwards), a Font combobox (the bundled
typefaces from fissure_font; see 1.6b above), an Interface-size combobox
(persisted and applied live: the main loop notices the changed
ui_size_index, recomputes the scale, reloads the font at the new pixel
size, refreshes the metrics, and rebuilds the layout, Sketchr's resize
recipe), a scan-policy pair (a "Request delay (ms)" rate limit and a
"Max threads (0=auto)" audit concurrency cap, applied to the next scan
from the Target view), a "Proxy port" field (the 127.0.0.1 listening
port, applied on the next proxy Start), a "Proxy history (0=inf)" field
(the in-memory captured-flow cap; oldest flows are pruned and the
on-disk history is trimmed to match), a "Response view (KiB)" field (how
much of a response the Repeater pane holds, 64-65536, default 1024;
anything larger is shown with a truncation marker naming the dropped
bytes, and since a textarea's capacity is fixed when it is created the
new size applies at the next start), a "Trusted CA file" path field (a
CA or certificate trusted on top of the detected system store, so an
https target with a private, internal-PKI or self-signed certificate is
reached with verification left on rather than by disabling verification
for every host; persisted as tls_ca_file and applied by the scan, the
CLI as --ca-file and the control API as ca_file), mTLS "Client
cert"/"Client key" path fields (applied to scan and Repeater requests
for client-cert-gated targets) and an "Extra plugin dir" field (merged
into the built-in plugin manifests), an "Export CA certificate" button
(writes the proxy CA cert PEM to a chosen path for trust-store install),
on platforms with a system certificate store (Windows) a "Trust CA for
this account" / "Remove CA from this account" pair beside it (installs
and removes the proxy CA in the current user's Trusted Root store, which
is what Chrome and Edge read; the confirmation says the grant is
account-wide and lasts until it is removed), a "Verify TLS certificates
on requests" toggle (persisted as default_tls_verify, OFF by default
because engagement targets routinely serve certificates no store trusts
and a failed check stops the request rather than producing a finding,
and applied by EVERY tool including the scanner: it used to be read only
by the single-request tools, which left the scan verifying against
whatever the process happened to have and made it fail targets the
Repeater reached), a "Use HTTP/2 when the server offers it (ALPN)"
toggle (on by default; persisted as enable_http2 and applied to the
scan, Repeater, Intruder, and access-control/user-script transport
configs, so turning it off forces HTTP/1.1), and an "Upstream proxy" /
"No-proxy hosts" pair (outbound proxy chaining). The target scope ("In
scope" / "Out of scope" pattern lists) and the "Aggressive (SQLi/LFI)"
toggle live in the Target view (next to the scan controls), not here,
since they govern a scan. The controls are grouped under collapsible
section headers (Appearance, Scanning, Proxy, TLS and requests, Plugins,
AI assistant, Reporting, PwnDoc integration, and Control API); each
header is a button that folds or unfolds its rows, prefixed [-] when
open and [+] when collapsed (a collapsed section hides its rows via
n_gui_set_widget_visible and reclaims their vertical space). layout()
places the visible controls top-down and derives the window height from
them rather than a fixed row count. The popup body scrolls
(N_GUI_WIN_AUTO_SCROLLBAR) and caps its height to the display so every
control stays reachable (the request default, honored by the Repeater
for self-signed hosts). Every control writes the store immediately. This
is the foundation the broader Settings view in section 4.2 grows into
(proxy/CA/scan policy, and the PwnDoc section in
docs/07_PAWNDOC.md).
4.3 View-to-widget mapping
The "New widget" column references section 5 (and
audits/NILOREA_AUDIT.md 5D). "(existing)" means it ships in
n_gui today.
| View | Existing n_gui widgets | New widget(s) needed |
|---|---|---|
| Dashboard | labels, buttons | custom severity-bar chart drawn by a window content-draw callback
(n_gui_window_set_content_draw_callback) |
| Proxy | tab panel, buttons, combobox, textareas | N_GUI_DATAGRID (history table),
N_GUI_SPLITPANE (request |
| Target | N_GUI_TREE, labels, buttons, checkboxes, combobox,
textareas |
N_GUI_DATAGRID (endpoint inventory),
N_GUI_PROGRESSBAR (scan progress), sitemap node graph as an
n_gui custom widget (n_gui_add_custom); the Target view is
also the scan launcher, there is no Scanner view |
| Findings | labels, buttons, textareas | N_GUI_DATAGRID (sortable by severity/host/type),
N_GUI_SYNTAXVIEW + N_GUI_HEXVIEW in the detail
pane, N_GUI_SPLITPANE |
| Repeater | tab panel, textareas, combobox, kvtable, buttons | N_GUI_SPLITPANE, N_GUI_SYNTAXVIEW,
N_GUI_HEXVIEW (reuse Hook request/response patterns) |
| Plugins (popup) | listbox, textareas, buttons, combobox | N_GUI_DATAGRID (plugin runs/results) |
| Report | labels, buttons, textareas | N_GUI_SYNTAXVIEW (HTML/markdown preview source) |
| Settings (popup) | checkboxes, comboboxes, textareas, sliders, buttons | none (the Interface-size selector drives Fissure's own scale and
font reload; n_gui_set_ui_scale is still a proposal) |
The Proxy and Findings detail panes share one composite layout: a
N_GUI_SPLITPANE whose two children are a
N_GUI_SYNTAXVIEW (when the body is text and
pretty-rendered) toggled with a N_GUI_HEXVIEW (raw bytes).
The request/response split itself is also a
N_GUI_SPLITPANE, giving a two-level split layout in those
views.
4.4 Z-order plan
Fissure reuses Hook's three working tiers exactly:
- Layout windows (Toolbar, Nav, Work, StatusBar):
N_GUI_ZORDER_NORMAL. - View content windows in the Work area:
N_GUI_ZORDER_ALWAYS_ON_TOP, so a click that raises the Work window does not hide the active view. - All popups, plus the shared confirm and prompt:
N_GUI_ZORDER_POPUP. - The quit dialog:
N_GUI_ZORDER_POPUP, re-raised every frame to stay frontmost.
Because POPUP is strictly above ALWAYS_ON_TOP, popups always draw over view content regardless of insertion order.
4.5 Popup lifecycle pattern
Every Fissure popup (CA-install dialog, add-to-scope, send-to-repeater target picker, plugin-run config, scan-config-as-popup, export-report dialog, plus the shared confirm/prompt) implements the Hook quartet:
fissure_gui_<mod>_ensure_built(ctx)(lazy, once, closed).fissure_gui_<mod>_toggle(ctx)->n_gui_toggle_window+ on-openn_gui_focus_window(ctx, win).fissure_gui_<mod>_handles_window(win_id)predicate.fissure_gui_<mod>_close_if_open(ctx).
The central ESC handler in main.c reads
n_gui_get_topmost_open_window(gui) and dispatches the close
to the module whose _handles_window claims it; if no popup
owns the topmost window, ESC opens the quit dialog. The window-manager
close button routes through the same quit dialog. Any new popup MUST add
a _handles_window predicate and an ESC dispatch clause, or
ESC will ignore it.
4.6 Confirm / prompt and dialog sizing
Fissure reuses one shared confirm modal and one shared prompt modal,
single-instance, single-confirm-at-a-time, ESC-closable, message names
the target. Every destructive operation (delete target/scope entry,
clear capture history, discard scan results, overwrite a report file,
remove a plugin) routes through the confirm. Create/rename operations
(named scope entries, saved repeater requests, plugin profiles) route
through the prompt. Both obey the
H = CONTENT_H + FISSURE_GUI_WIN_CHROME_H sizing rule from
1.4.
That rule covers the rule and preset editors too, and there it matters most: a "Remove" in the Match-and-replace, Intercept-rules, Session-rules, Highlighter/ Extractor, Auto-replay, Auth-matrix, Workflow, Inspector, Organizer, Parameters, Resource-pool, Schedules, User-agent, Environments, and Tags popups names the exact rule, variable, or preset it will delete before it deletes it, and every "Restore defaults" button (Highlighter/Extractor, Session rules, Auto-replay, Environments, Tags) says how many user-authored records it will replace, because one click on it otherwise destroys a whole hand-written ruleset with no undo. The confirmed action re-validates its target when the operator accepts: the list can change while the question is on screen, and a stale target is reported ("that rule is gone") instead of removing whatever now sits at that position.
Grid-backed editors must also survive a sort.
n_gui_datagrid_sort physically permutes the rows and a
header click always sorts, so a display row is NOT a store position.
Every one of those popups therefore carries the record's stable key in
the row's OWN cell (a hidden key column, or a visible "#" / Name column
that already holds it) and resolves a click with
n_gui_datagrid_get_cell; an index-addressed store
re-validates the key before acting on it. Rebuilding a grid in place
also resets its scroll offset and selection, and the rule editors
rebuild on every keystroke, so each refresh_grid saves and
restores n_gui_datagrid_get/set_scroll_offset plus
get/set_h_scroll and re-selects by key under an
s_suppress_select guard (the guard stops the programmatic
re-select from reloading the editor fields under the operator's cursor).
src/fissure_gui_hae.c is the reference implementation of
all three.
4.6.1 Layout audit
(--selftest-geometry)
The dialog-sizing and reflow rules above are checked by the program
rather than by eye. ./fissure --selftest-geometry opens
every entry the command palette indexes (the shared toolbar module
registry plus the palette-only dialogs, so a new view or popup joins the
sweep with no second list to maintain), then the dialogs the palette
deliberately does not carry, which are reached from a selected request
or a keystroke: the CSRF and clickjack PoC generators, the AI assist,
add-to-collection, the extension panel host, the request context menu,
the Inspector on a loaded request, and the shared confirm, prompt and
quit modals. Each is opened with sample content, so what is audited is a
dialog with something in it. The sweep lets the next frame build and
reflow each at its live size, and audits every window that is open,
reporting:
- clipped: a visible widget outside the window's client box, which is what an operator sees as a dialog that opens with a scrollbar and a bottom row half off the edge;
- overlap: two visible widgets sharing a rectangle, where the one drawn later hides the earlier one (splitpane dividers are exempt, they sit on the seam by design);
- cut text: a label showing less than its text,
either a single-line one wider than its box whose text runs into a
neighbour or past the window edge, or a wrapped
(
N_GUI_ALIGN_JUSTIFIED) one taller than its box, which n_gui clips and gives an inner scrollbar. Measured throughn_gui_label_fits, so it is the draw path's own arithmetic rather than a guess; - h-scroll: a data grid narrower than its own
columns, which is a dialog whose minimum width was picked without asking
the grid (
n_gui_datagrid_columns_width).
Two things are deliberately NOT defects: a window whose content cannot fit the display even at full height is a scrolling window (the long Settings list, the scan-options sheet) and its auto-scrollbar is the design; and a grid whose columns could not fit the screen at any window size scrolls sideways by design, which is what a traffic grid with twenty columns does. Both are decided by measurement, not by a list of exempt names.
One of those contextual dialogs failing to open would be audited as
nothing and reported as clean, which is the one way the sweep could lie,
so each is required to leave a pop-up on screen and is reported as
missing when it does not.
The sweep takes the window size it is given, so
--selftest-size WxH (with an Xvfb screen to match) audits
the same layouts at another size, and the interface size is seeded in
the run's config dir (ui_size_index in settings.json) to
audit them at another scale. tests/test_guigeom runs twelve
configurations, listed in its own k_cases table: four
window sizes from 800x500 (the smallest the program allows) up to
1600x1000, 1024x700 at the Small, Large and Huge interface sizes, each
of the four non-default picker fonts (Inter, Noto Sans, Roboto,
Liberation Sans) at the default size, and 1024x700 at the Huge size in
Noto Sans (the tallest-lined face). All twelve are expected clean. The
window and scale axes are needed because what a view lays out in is the
window DIVIDED BY the interface scale, so neither proves the other, and
each has caught defects the other could not see. The small one is where
views break: a view is laid out from the size it is given, so a layout
tuned at one size proves nothing about another. The large one is where
popups break: two of the checks above ask whether a bigger window would
fix the defect before reporting it, so a dialog that clips its own
button row and a grid narrower than its columns are legitimately silent
on a screen too small to hold them either way, and speak up only on a
screen that could. The interface-size pass is a third axis rather than a
fourth point on the same one: what a view lays out in is the window
divided by ui_scale, so the Small size at 1024x700 is a
narrower effective panel than any window the test gates, and it is where
anything measured in scaled metrics breaks. Give the Xvfb screen the
same size as the window, or the audit answers a question nobody asked:
that reference is the display, and it is read from the real one (see
n_gui_set_display_size in main.c, which used to be left at
the compiled-in default for a selftest run).
One n_gui behaviour to know before choosing a label alignment: in a
window that is resizable or carries an auto-scrollbar, a label is
allowed to grow into the free space to its RIGHT, and a
N_GUI_ALIGN_CENTER label then centres its text over that
whole span rather than over its own box. For a full-width heading the
two are identical, which is what every centred label in Fissure is; for
a narrow centred label sharing a row, the text drifts to the middle of
the panel and lands under its neighbours, with only the sliver between
two of them visible. Use CENTER for headings and LEFT for anything
mid-row. The layout audit cannot see this, since it measures boxes and
this is the draw path putting text outside one.
Every "would a bigger window fix this?" question the audit asks is
answered against what the WIDGET'S OWN WINDOW can attain, not against
the display, because the two are not the same thing. A pop-up can be
dragged out to the display, so for one of those the display is the right
ceiling and the question is meaningful: a dialog whose minimum was
picked without asking its own grid, or which opens with its button row
below the fold, is a sizing bug and is reported. One of the four tiled
layout panels (N_GUI_WIN_FIXED_POSITION: the toolbar, the
nav pane, the work area, the status bar) cannot be resized by the
operator at all, and the sweep runs the main window at the display size,
so a tiled panel is already as large as it will ever be. Asking the
display on its behalf claimed a defect was fixable by a resize nobody
can perform, and it reported view grids and view overflow that no window
size on that display could have fixed.
For a tiled panel the honest question is not "could it be bigger" but
"can the operator reach the content", and that is decided by the panel's
own scrollbar. Every view carries N_GUI_WIN_AUTO_SCROLLBAR,
so content past its edge scrolls into reach and is not a defect; the
toolbar, nav pane and status bar carry none, so content past THEIR edge
really is lost and is still reported. A grid in a tiled panel is exempt
from the column check for the same reason: its pane is whatever the
layout gives it, no resize widens it, and the columns are held to the
pane by the view's own flex column with the grid's horizontal scroll as
the fallback.
What that leaves for the views is overlap and cut text, which is the right pair: a widget painted over its neighbour and a label showing less than its text are both losses the operator cannot scroll around. Both were verified to still fire by introducing each defect deliberately and watching the sweep report it, along with a pop-up sized too short, a pop-up grid narrower than its columns, and a clipped widget in the nav pane. An audit trusted to be silent has to be shown to speak.
The sweep exits non-zero on any defect and
tests/test_guigeom is that sweep, so a layout regression
fails the build. It skips when the GUI binary or an X server is missing
(make tests builds the tests, not the app: run
make first). The audit itself is
src/fissure_gui_geom.c; it found 102 defects across 15
windows on its first run, all of which are fixed.
4.7 Theme system
Fissure reuses Hook's theme architecture: a
FISSURE_THEME struct of named ALLEGRO_COLOR
fields, 18 built-in palettes (Dark default; the full list is in 1.6),
FISSURE_C_* macros reading from
fissure_gui_theme_current(), a generation counter +
force-retheme flag for per-widget refresh, and a theme_id
persisted in settings. Severity colors (Info/Low/Medium/High/Critical)
and HTTP-status/method colors are SEMANTIC and stay invariant across
themes so a Critical finding is always the same red. Hook's
environment-accent overlay (accent tint plus a StatusBar stripe) was not
carried over: Fissure has no per-target accent.
4.8 Responsive and DPI plan
Fissure combines both sibling approaches.
From Sketchr (the ui_scale recipe, stated explicitly):
- Keep ONE
ui_scalemultiplier (fissure_ui_scale_compute), computed once at init and recomputed on a Settings interface-size (or font) change; a plain window resize does not change it. Base 1.0 times the user size factor (Small/Normal/Large/Huge = 0.85/1.0/1.15/1.3), times the detected DPI factor fromn_gui_detect_dpi_scale. - Store ALL GUI metric constants as base values; multiply them by
ui_scalein a singlefissure_gui_metrics_update()before layout. - Compute
font_px = round(BASE_FONT_PX * ui_scale)and RELOAD the default font at that pixel size on init and on a settings change. This is the part Hook omits; Fissure does it.
From Hook (the per-window adaptive policy):
- Call
n_gui_set_resize_mode(gui, N_GUI_RESIZE_ADAPTIVE). - Layout windows and view content windows use
N_GUI_WIN_RESIZE_NONE: Fissure repositions and resizes them itself every frame from the cached display size (fissure_gui_main_build), so n_gui must not also scale them.N_GUI_WIN_RESIZE_SCALEis unused. - Popups and the quit dialog use
N_GUI_WIN_RESIZE_MOVE(recenter, no scale); the context menu usesN_GUI_WIN_RESIZE_NONE. - Frameless windows skip min_w/min_h.
Resize handler (synchronous, in the single event loop of
main.c):
if (ev.type == ALLEGRO_EVENT_DISPLAY_RESIZE) {
al_acknowledge_resize(display); // mandatory
fissure_app_refresh_display_size(app); // cache w/h
n_gui_set_display_size(gui, (float)app->display_w, (float)app->display_h);
do_draw = 1;
}The re-layout happens on the next frame:
fissure_gui_main_build runs before every draw and
repositions the four layout windows and the active view from the cached
display size, and each open resizable popup reflows through its
fissure_gui_<name>_relayout hook. The scale-dependent
work lives in a separate block of the same loop that fires when Settings
changes ui_size_index or font_id: it
recomputes ui_scale, reloads the font at the new pixel size
(load_ui_font), re-points the Markdown panes
(fissure_gui_mdfonts_reload), rescales the grid column
widths (fissure_gui_columns_rescale), calls
fissure_gui_metrics_update, and re-sizes the quit
dialog.
Proposed Nilorea addition so the font reload lives in the library,
not in Fissure: n_gui_set_ui_scale(ctx, scale) (section 5).
It does not exist in nilorea yet (still a proposal); Fissure keeps doing
the reload itself.
Event loop: one blocking while (running) loop with a
deferred redraw flag (Sketchr 2.1). The flag is set by
input events, a resize, and the FISSURE_FPS (60 fps) timer,
and a frame is drawn only once the event queue has drained, so a flood
of events coalesces into one frame. New captured proxy rows and scan
findings produced by worker threads are picked up by the views'
per-frame ticks (which must only trylock the shared locks,
never block) on the next timer frame.
4.9 Custom drawing
Fissure draws what n_gui has no widget for in three
ways, each sized from live rectangles every frame so it reflows on
resize and respects ui_scale:
- After
n_gui_drawinmain.c: only the Targets nav / Work divider grip (fissure_gui_main_draw_nav_divider), painted over the frame. - A window content-draw callback
(
n_gui_window_set_content_draw_callback): the Dashboard's severity bar chart (draw_chartinfissure_gui_dashboard.c), drawn inside the window's own clip and scroll so it stays in z-order with the window. - An n_gui custom widget (
n_gui_add_custom): the Target view's site-map node graph (sitemap_graph_drawinfissure_gui_sitemap.c) and the extension panels (fissure_gui_extpanel.c). A custom widget has no native mouse hooks, so the graph's pointer handling (fissure_gui_sitemap_graph_event) is called from the main event loop beforen_gui_process_event.
Scan progress is a plain N_GUI_PROGRESSBAR in the Target
view, not a custom chart.
All custom-drawn colors that carry meaning (severity, HTTP status)
come from the semantic palette and stay theme-invariant; backgrounds and
text come from the active theme via the FISSURE_C_*
macros.
5. The n_gui widgets Fissure needed
Six of the seven items below SHIPPED in Nilorea n_gui
and Fissure uses them today: the hex view (5.1), the sortable data grid
(5.2), the syntax view (5.3), the split pane (5.4), the progress bar
(5.5) and the textarea placeholder (5.7). Only 5.6
(n_gui_set_ui_scale) is still a proposal: Fissure computes
its own ui_scale and reloads the font itself, which works
but keeps that recipe out of the library.
The signatures below are the ORIGINAL proposals, kept because they
record what was asked for and why. The shipped API differs in places
(the real one takes N_GUI_CTX* and float coordinates, and
several calls gained arguments), so read
../../nilorea-library/include/nilorea/n_gui.h for the
current contract, not this section. They follow the library conventions
(ALL_CAPS typedefs, n_gui_* naming, new_* /
*_free, Doxygen /*! @brief */, an
examples/ex_*.c, a Makefile link rule, a
run_tests.sh entry, one commit per point) and are
cross-referenced in audits/NILOREA_AUDIT.md section 5D.
Since this section was written, n_gui also gained
widgets Fissure needed that were never on this list: the key/value table
(N_GUI_KVTABLE, the shared +/x multi-row editor), the tree
view, the drop menu, the listbox, native OS window detachment, and
datagrid horizontal scrolling.
5.1 Hex viewer / editor
(N_GUI_HEXVIEW)
Offset | hex columns | ASCII gutter, with selection and optional editing. Used for raw request/response bodies in Proxy, Repeater, and Findings detail.
typedef struct N_GUI_HEXVIEW N_GUI_HEXVIEW;
int n_gui_add_hexview(N_GUI* ctx, int win_id, int x, int y, int w, int h,
int bytes_per_row, int editable);
int n_gui_hexview_set_data(N_GUI* ctx, int widget_id,
const unsigned char* data, size_t len);
int n_gui_hexview_get_selection(N_GUI* ctx, int widget_id,
size_t* off, size_t* len);
int n_gui_hexview_set_byte(N_GUI* ctx, int widget_id, size_t off,
unsigned char value);5.2
Virtualized sortable data grid (N_GUI_DATAGRID)
Column model + a row-provider callback, drawing only visible rows so 10k+ rows (history, findings, plugin runs) stay smooth. Click-to-sort per column; selection callback. The proxy history and findings tables both use this.
typedef struct N_GUI_DATAGRID N_GUI_DATAGRID;
typedef const char* (*n_gui_datagrid_cell_cb)(size_t row, int col, void* ud);
int n_gui_add_datagrid(N_GUI* ctx, int win_id, int x, int y, int w, int h);
int n_gui_datagrid_add_column(N_GUI* ctx, int widget_id, const char* title,
int width, int sortable);
int n_gui_datagrid_set_source(N_GUI* ctx, int widget_id, size_t row_count,
n_gui_datagrid_cell_cb cell, void* ud);
int n_gui_datagrid_set_row_count(N_GUI* ctx, int widget_id, size_t row_count);
int n_gui_datagrid_set_sort(N_GUI* ctx, int widget_id, int col, int ascending);
int n_gui_datagrid_get_selected(N_GUI* ctx, int widget_id, size_t* row);
int n_gui_datagrid_set_on_select(N_GUI* ctx, int widget_id,
void (*cb)(size_t row, void* ud), void* ud);5.3
Syntax-highlight text view (N_GUI_SYNTAXVIEW)
Read-mostly text view with a pluggable tokenizer (JSON / HTML / JS / HTTP). Reuses the textarea scroll/selection machinery but colors tokens. Used for pretty-rendered bodies and the report-source preview.
typedef enum {
N_GUI_SYNTAX_NONE, N_GUI_SYNTAX_JSON, N_GUI_SYNTAX_HTML,
N_GUI_SYNTAX_JS, N_GUI_SYNTAX_HTTP
} N_GUI_SYNTAX_LANG;
typedef struct N_GUI_SYNTAXVIEW N_GUI_SYNTAXVIEW;
int n_gui_add_syntaxview(N_GUI* ctx, int win_id, int x, int y, int w, int h,
N_GUI_SYNTAX_LANG lang);
int n_gui_syntaxview_set_text(N_GUI* ctx, int widget_id, const char* text,
size_t len);
int n_gui_syntaxview_set_lang(N_GUI* ctx, int widget_id,
N_GUI_SYNTAX_LANG lang);5.4 Split-pane
container (N_GUI_SPLITPANE)
A draggable divider between two child regions, horizontal or vertical, with a settable ratio. Used for request|response and for table-over-detail layouts; nests for two-level splits.
typedef enum { N_GUI_SPLIT_HORIZONTAL, N_GUI_SPLIT_VERTICAL } N_GUI_SPLIT_DIR;
typedef struct N_GUI_SPLITPANE N_GUI_SPLITPANE;
int n_gui_add_splitpane(N_GUI* ctx, int win_id, int x, int y, int w, int h,
N_GUI_SPLIT_DIR dir, float ratio);
int n_gui_splitpane_set_ratio(N_GUI* ctx, int widget_id, float ratio);
int n_gui_splitpane_get_rects(N_GUI* ctx, int widget_id,
int* ax, int* ay, int* aw, int* ah,
int* bx, int* by, int* bw, int* bh);get_rects lets the caller lay out child widgets into the
two regions and re-lay-out them when the divider moves or the window
resizes.
5.5 Progress bar
(N_GUI_PROGRESSBAR)
Determinate (0.0..1.0) or indeterminate, optional segment colors for scan phases, optional centered label. Used for scan progress in the Target view and in the Sequencer popup.
typedef struct N_GUI_PROGRESSBAR N_GUI_PROGRESSBAR;
int n_gui_add_progressbar(N_GUI* ctx, int win_id, int x, int y, int w, int h);
int n_gui_progressbar_set_value(N_GUI* ctx, int widget_id, float value01);
int n_gui_progressbar_set_indeterminate(N_GUI* ctx, int widget_id, int on);
int n_gui_progressbar_set_label(N_GUI* ctx, int widget_id, const char* text);5.6
UI-scale font reload (n_gui_set_ui_scale), still a
proposal
This is the one item in this section that was never built. Fissure
computes its own ui_scale and reloads the font itself (see
the responsive/DPI section above), so the requirement is met, but the
recipe stays in the application instead of the library.
Generalizes Sketchr's recipe into the library: set one scale, reload the default font at the scaled px size, and expose the scale as the single source of truth for metric scaling. Fissure would call this on init and on a settings change; metric constants are multiplied by the returned scale before layout.
int n_gui_set_ui_scale(N_GUI* ctx, float scale); // reloads default font at BASE_PX*scale
float n_gui_get_ui_scale(N_GUI* ctx);This is the single most important upstream addition for the "as responsive and DPI-aware as Sketchr" requirement, because it moves the font-reload step (which Hook lacks) into Nilorea where every consumer benefits.
5.7
Textarea placeholder / hint
(n_gui_textarea_set_placeholder)
Optional dimmed hint text shown while a textarea is empty and cleared from view as soon as the user types (single-line and multiline). The colour is the midpoint of the theme's text and background, so it reads as a hint in both light and dark themes. Fissure sets a meaningful hint on every editable input, the Intruder URL template shows the backtick fuzz-marker syntax, the Repeater URL/headers/body show their expected format, Settings path/host/port fields show example values, and the Multitool shows what to paste.
void n_gui_textarea_set_placeholder(N_GUI_CTX* ctx, int widget_id, const char* text);6. Summary
Fissure's GUI is Hook's window/z-order/popup/confirm/theme
architecture, made crisply DPI-scalable with Sketchr's
single-ui_scale-plus-font-reload recipe, extended with the
Nilorea n_gui widgets a security-tool UI needs and that
benefit the whole library: the hex view, sortable data grid, syntax
view, split pane, progress bar and textarea placeholder all shipped,
along with the key/value table, tree, drop menu, listbox and native
window detachment that came later; only the ui-scale font reload (5.6)
is still an application-side recipe. Business logic (proxy, scanner,
findings, reporting) lives in Fissure and the sibling docs;
infrastructure (widgets, scaling) goes upstream into Nilorea, per the
upstream-first rule.