exlab_wizard.ui.pages.problems#

Problems tab (Frontend Spec §11).

Filter chips (Severity, Class, State, Scope), table of findings, and a footer status bar (“Showing N of M findings · Last audit: HH:MM:SS · Next refresh in 23s”).

The override-and-allow-sync dialog (§11.5) is implemented here as well: the operator picks a reason (10–500 chars after trim), an optional expiry, ticks the acknowledgement checkbox, and submits.

Functions

class_chip_definitions()

One chip per problem class (Frontend §11.1).

empty_state_text(state, *[, ...])

Compute the empty-state copy per Frontend §11.4.

filter_findings(findings, state)

Filter findings against the active chip / search state.

near_limit(reason)

Return True when the counter should turn warning-tier (last 10).

render_problems_page(*, findings[, state, ...])

Render the Problems tab content.

severity_chip_definitions()

Severity chips per Frontend §11.1.

state_chip_definitions()

State chips (Frontend §11.1).

validate_override_reason(reason)

Validate an override reason per Frontend §11.5.

Classes

Finding(finding_id, severity, rule_class, ...)

One row in the Problems table.

ProblemsPageState([severity_chips, ...])

Mutable filter state.

class exlab_wizard.ui.pages.problems.Finding(finding_id, severity, rule_class, path, matched_token, run_label, equipment, detected_at, state)[source]#

Bases: object

One row in the Problems table.

Parameters:
detected_at: str#
equipment: str#
finding_id: str#
matched_token: str#
path: str#
rule_class: str#
run_label: str | None#
severity: str#
state: str#
class exlab_wizard.ui.pages.problems.ProblemsPageState(severity_chips=<factory>, class_chips=<factory>, state_chips=<factory>, scope='all', search='')[source]#

Bases: object

Mutable filter state.

Parameters:
class_chips: ChipState#
scope: str = 'all'#
search: str = ''#
severity_chips: ChipState#
state_chips: ChipState#
exlab_wizard.ui.pages.problems.class_chip_definitions()[source]#

One chip per problem class (Frontend §11.1).

Return type:

tuple[ChipDefinition, ...]

exlab_wizard.ui.pages.problems.empty_state_text(state, *, soft_findings_hidden_count=0)[source]#

Compute the empty-state copy per Frontend §11.4.

Parameters:
Return type:

str

exlab_wizard.ui.pages.problems.filter_findings(findings, state)[source]#

Filter findings against the active chip / search state.

Parameters:
Return type:

list[Finding]

exlab_wizard.ui.pages.problems.near_limit(reason)[source]#

Return True when the counter should turn warning-tier (last 10).

Parameters:

reason (str)

Return type:

bool

exlab_wizard.ui.pages.problems.render_problems_page(*, findings, state=None, on_override=None, on_revoke_override=None)[source]#

Render the Problems tab content.

Parameters:
Return type:

Any

exlab_wizard.ui.pages.problems.severity_chip_definitions()[source]#

Severity chips per Frontend §11.1.

Return type:

tuple[ChipDefinition, ...]

exlab_wizard.ui.pages.problems.state_chip_definitions()[source]#

State chips (Frontend §11.1).

Return type:

tuple[ChipDefinition, ...]

exlab_wizard.ui.pages.problems.validate_override_reason(reason)[source]#

Validate an override reason per Frontend §11.5.

Returns (ok, error_message). ok=False when the reason is too short or too long after trimming; the message names the failed bound.

Parameters:

reason (str)

Return type:

tuple[bool, str | None]