UI Reference¶
The UI package defines NiceGUI pages, widgets, dialogs, and page-level interaction handlers.
Package entrypoint¶
Purpose: UI package export surface.
Admin page¶
Purpose: system-level controls and operational administration UI.
Admin panel — manage material categories, workflow steps, printers, embossers, metadata options, and database backups.
Changes applied (see fix_specs.json): FIX-013 Backups tab added: shows scheduler status, recent backup log, and a manual "Run Backup Now" button. FIX-017 Metadata key backfill now shows a dry-run preview dialog before executing, listing proposed key mappings and skipped keys.
admin_page(content_area)
¶
Render the admin settings page.
Source code in accessibility_mgr/ui/admin.py
Binary integrations dashboard¶
Purpose: external binary integration status and controls.
Production accessibility binary integration dashboard.
binary_integrations_dashboard(content_area)
¶
Render production binary integration dashboard.
Source code in accessibility_mgr/ui/binary_integrations_dashboard.py
Braille jobs page¶
Purpose: braille job listing, creation, and workflow-state updates.
Braille Jobs panel — full workflow tracking with file ingestion, Dublin Core metadata, PREMIS event log, and step management.
Changes applied (see fix_specs.json):
FIX-003 _save_all in metadata dialog now calls Q.log_event (persisted to DB).
FIX-008 _ingest_dialog pre-populates project context from job metadata so
files land in artifacts/
CICD dashboard¶
Purpose: CI/CD visibility and hook/operation status views.
CI/CD accessibility validation dashboard.
AUDIT-FIX (follow-up): this page used to be a static capability checklist with no way to actually trigger a validation run — it only displayed history that nothing in the app ever wrote to. It now has a real "Run Validation" form that calls CICDValidationHookService against a real EPUB path and persists the result to the database (see integrations/cicd_hooks.py + db/queries.py).
cicd_dashboard(content_area)
¶
Render CI/CD accessibility validation dashboard.
Source code in accessibility_mgr/ui/cicd_dashboard.py
Shared UI components¶
Purpose: reusable badges, dialogs, progress, and notification helpers.
Shared UI helpers — progress bars, badges, confirmation dialogs, notifications.
card_row(*labels, cls='')
¶
Render a row of label-value pairs inside a card layout.
Source code in accessibility_mgr/ui/components.py
confirm_dialog(message, on_confirm, title='Confirm')
¶
Show a modal confirmation dialog; call on_confirm only if the user confirms.
Source code in accessibility_mgr/ui/components.py
file_picker(holder, *, accept='', hint='Click to select a file from this machine', label='Attach File')
¶
Render a file picker that stages the selected file into FILES_DIR.
Clicking the control opens the native browser file dialog. The chosen file
is written into the app staging directory (Q.FILES_DIR) so it satisfies
ingest_file's SEC-004 staging requirement, and the staged absolute
source path is recorded on holder under source_path (and
file_name for the original basename). Callers read
holder.get("source_path") from their save handler and pass it as the
ingest/copy source. Selecting a file replaces any previously staged one.
SEC-005: the incoming event.name originates in the browser and may carry
path separators or traversal sequences, so only a sanitised basename is used
to build the staged path.
Source code in accessibility_mgr/ui/components.py
file_use_badge(file_use)
¶
Render a colored badge indicating the file's role (e.g. ORIGINAL, DERIVATIVE).
Source code in accessibility_mgr/ui/components.py
notify_error(msg)
¶
open_folder(path)
¶
Open a folder in the OS file manager. Returns True if launched.
Uses xdg-open on Linux, open on macOS, and explorer on Windows.
Because APM runs as a local web app this opens the folder on the host
machine in the default file browser.
Source code in accessibility_mgr/ui/components.py
progress_bar(done, total)
¶
Render a compact labelled progress bar.
Source code in accessibility_mgr/ui/components.py
validate_iso_date(value, label)
¶
Validate YYYY-MM-DD date strings and notify on failure.
Source code in accessibility_mgr/ui/components.py
Dashboard page¶
Purpose: top-level operational summary and quick navigation.
Delivery dialog¶
Purpose: job delivery confirmation and delivery metadata capture.
Shared delivery dialog helper (FIX-016).
Call open_delivery_dialog() from any job detail view when the operator clicks "Mark Done" on the Delivered step. Captures delivery method, recipient, and date before writing the step completion and delivery fields.
open_delivery_dialog(job_type, job_id, on_done, agent='user')
¶
Open a delivery confirmation dialog for any job type.
On confirmation, calls Q.record_delivery() which: - Sets delivered = 1 and all four delivery_ columns - Logs a DELIVERY event to metadata_event - Logs a FIELD_UPDATE event (via update_*_job)
Parameters¶
job_type : str One of 'braille', 'lp_ebraille', 'tactile', 'print'. job_id : int Primary key of the job being delivered. on_done : callable Zero-argument callback invoked after the DB writes complete. agent : str Name/identifier of the actor confirming delivery.
Source code in accessibility_mgr/ui/delivery_dialog.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
Ingestion page¶
Purpose: file ingestion workflows and metadata attachment UI.
File Ingestion page — preservation-aware ingest of accessibility-production assets.
Computes SHA-256, stores in job_files/, creates file_object record, and logs a PREMIS INGEST event.
ingestion_page(content_area)
¶
Render the file ingestion page.
Source code in accessibility_mgr/ui/ingestion.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | |
Inventory panels¶
Purpose: inventory cards/forms for filament, paper, and electronics.
Inventory panels — Filament, Braille Paper, Electronics.
These replace the old models/inventory.py (which was mistakenly used as a UI file) and the partial ui/inventory.py stub.
electronics_page(content_area)
¶
Render grouped electronics inventory with CRUD actions.
Source code in accessibility_mgr/ui/inventory_panels.py
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | |
filament_page(content_area)
¶
Render the filament inventory list and edit controls.
Source code in accessibility_mgr/ui/inventory_panels.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
paper_page(content_area)
¶
Render the braille paper inventory list and edit controls.
Source code in accessibility_mgr/ui/inventory_panels.py
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | |
Job components¶
Purpose: shared job table/form/status UI blocks.
Shared job detail components for metadata and event-log rendering.
export_job_summary(*, job_type, job, step_order, step_labels)
¶
Generate and download a print-ready HTML summary for a job.
Source code in accessibility_mgr/ui/job_components.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
open_metadata_dialog(job_type, job_id, on_done)
¶
Open the shared metadata editor dialog for a job.
Source code in accessibility_mgr/ui/job_components.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
render_event_log(*, job_type, job_id, step_labels, on_done, title='Provenance / Event Log', subtitle='', step_badge_classes='text-xs bg-blue-50 text-blue-700 rounded px-1')
¶
Render the shared event log card body with add-note dialog.
Source code in accessibility_mgr/ui/job_components.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | |
Lineage page¶
Purpose: lineage graph and file/job provenance views.
Lineage viewer — visualises derivative relationships and provenance chains using data from the file_object, job_file_link, and metadata_event tables.
lineage_page(content_area)
¶
Render the Asset Lineage Viewer.
Source code in accessibility_mgr/ui/lineage.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |
LP/eBraille page¶
Purpose: large print/eBraille job handling and status progression.
LP / eBraille / EPUB3-DAISY jobs panel.
Changes applied (see fix_specs.json):
FIX-003 _save_all in metadata dialog now calls Q.log_event (persisted to DB).
FIX-008 _ingest_dialog pre-populates project context from job metadata so
files land in artifacts/
Metadata editor¶
Purpose: edit and inspect structured metadata fields.
Metadata editor — edit and inspect Dublin Core and custom metadata for any job.
Changes applied (see fix_specs.json): FIX-003 Metadata saves now call Q.log_event (persisted to DB) instead of the in-memory MetadataAuditService. MetadataAuditService import removed.
metadata_editor_page(content_area)
¶
Render the metadata editor page.
Source code in accessibility_mgr/ui/metadata_editor.py
Metadata options¶
Purpose: metadata option controls and configured value lists.
Metadata option catalog for UI forms.
Defaults live in this file and can be overridden/extended from Admin Settings,
where metadata keys are persisted in material_category sections.
get_allowed_metadata_keys()
¶
Return all allowed metadata keys across all option groups.
get_dublin_core_examples()
¶
Return examples keyed by current DC keys (blank when no built-in example exists).
get_dublin_core_keys()
¶
get_non_dc_allowed_keys()
¶
Return non-Dublin-Core keys (eBraille Profile + METS/PREMIS).
Operations dashboard¶
Purpose: operations-oriented runtime metrics and controls.
Operations analytics dashboard.
operations_dashboard_page(content_area)
¶
Render operational analytics dashboard.
Source code in accessibility_mgr/ui/operations_dashboard.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
Pipelines page¶
Purpose: pipeline run controls and execution status tracking.
Pipeline orchestration page — executes multi-stage accessibility production pipelines.
Each pipeline run calls PipelineService.run_pipeline() which invokes each step via ExecutionService and persists results to DB via db.queries.
pipelines_page(content_area)
¶
Render the Workflow Pipelines page.
Source code in accessibility_mgr/ui/pipelines.py
Print jobs page¶
Purpose: 3-D print job management and workflow updates.
Print Jobs panel — log and manage 3-D print jobs with full workflow tracking.
Changes applied (see fix_specs.json): FIX-003 Metadata save now calls Q.log_event (persisted to DB). FIX-007 Job detail view added with five workflow step columns (designed, sliced, printed, inspected, delivered). FIX-016 Delivered step opens delivery confirmation dialog.
QA page¶
Purpose: QA execution and review interactions.
QA Tooling page — runs accessibility validation tools and shows history.
Changes applied (see fix_specs.json): FIX-012 Run dialog now has optional job-type selector and job-ID input. When a job is linked, the result appears in that job's event log.
qa_page(content_area)
¶
Render the QA Tooling page.
Source code in accessibility_mgr/ui/qa.py
QA dashboard¶
Purpose: QA metrics and historical quality trend visibility.
EPUB accessibility QA review page.
Runs a real DAISY Ace accessibility check against a user-supplied EPUB file, then opens a popup form pre-filled with the measures Ace reported (score, pass/fail, issues) so a reviewer can confirm or adjust them before submitting the result to the database.
AUDIT-FIX-002: this page previously ran against a hardcoded SAMPLE_EPUBS list through a self-documented "simulated" Ace check, and persisted results to an in-memory QAPersistenceService that was wiped on every restart. It now calls the real binary integration (services/epub_qa.py -> services/toolchain_binaries.py) and writes confirmed measures to the qa_measure table via db/queries.py.
qa_dashboard_page(content_area)
¶
Render the EPUB accessibility QA review page.
Source code in accessibility_mgr/ui/qa_dashboard.py
Reports page¶
Purpose: faceted reporting and export of jobs across workflow types.
Reports page — faceted filtering and export of jobs by student, school, grade, material type, status, and date range.
New file (FIX-015).
reports_page(content_area, presets=None)
¶
Render the Reports page.
Source code in accessibility_mgr/ui/reports.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | |
Search page¶
Purpose: cross-entity search UI over jobs, files, metadata, and events.
Search page — full-text search across jobs, files, metadata, and event log.
Changes applied (see fix_specs.json): FIX-009 Replaced in-memory Python filtering with Q.search_all() which uses parameterised SQL LIKE queries — no more per-job DB round-trips. FIX-014 Event log content, agent names, and file checksums are now searchable.
search_page(content_area)
¶
Render the Search page.
Source code in accessibility_mgr/ui/search.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |
Security dashboard¶
Purpose: security posture views and access-related controls.
RBAC security and authorization dashboard.
security_dashboard_page(content_area)
¶
Render RBAC security dashboard.
Source code in accessibility_mgr/ui/security_dashboard.py
Tactile graphics page¶
Purpose: tactile graphics job management and step progression.
Tactile graphics jobs panel.
Changes applied (see fix_specs.json): FIX-006 _ingest_dialog added; Files card added to job detail view. FIX-003 _save_all in metadata dialog now calls Q.log_event (persisted to DB). FIX-016 Delivered step opens delivery confirmation dialog instead of direct toggle.
Workflow monitor¶
Purpose: queued workflow execution monitoring and state transitions.
Workflow execution monitoring dashboard.
workflow_monitor_page(content_area)
¶
Render workflow execution monitoring UI.