Task: Calendar Qt UI: source/editability display, regenerate button, browse-holidays view
Table of Contents
This page documents a task in the Calendar entity follow-ups: date picker, list-pagination fix, QuantLib materialization story. It captures the goal, current status, acceptance, and any notes or results.
Goal
The remaining Qt pieces of the parent task's step 6, in two independent halves:
- Not blocked: Calendar's detail dialog currently lets a user edit
any calendar row, including the 60 seeded QuantLib-transcribed ones
–
source=/=is_editable=/=base_calendar_codeexist on the domain type and in the database (since step 4) but are not shown anywhere in the UI, and nothing stops editing asource'quantlib'= row's own fields. Add the three fields to the detail dialog and lock the whole form (not just the usual locked-after-create fields) whenever the opened row hasis_editable=false. Also add a "Regenerate up to <year>" action wired to therefdata.v1.calendar_dates.regenerateNATS command from step 4. - Blocked: a "Browse Holidays" view opened from Calendar's detail dialog, showing that calendar's materialised calendar_dates rows – needs Add codegen Qt facet for paginated read-only junction-scoped lists to exist first.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Calendar entity follow-ups: date picker, list-pagination fix, QuantLib materialization |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-07-27 |
Acceptance
[X]Calendar's detail dialog showssource,is_editable, andbase_calendar_code(the last as a dynamic combo over other calendars, matchingcalendar_rule=/=calendar_exception's existingcalendar_codecombo pattern).[X]Opening asource'quantlib'= calendar locks every field in the dialog, not just the fields already locked-after-create – users cannot edit a QuantLib-sourced calendar's own name/type/country via the UI, full stop.[X]A "Regenerate up to <year>" action exists (calendar detail dialog or list-window toolbar) that callsrefdata.v1.calendar_dates.regeneratefor the open calendar and surfaces success/failure and rows-written to the user.[X]A "Browse Holidays" action opens a read-only, paginated view of the calendar'scalendar_datesrows, each showing date, is-business-day, and source – built on the facet from Add codegen Qt facet for paginated read-only junction-scoped lists. Split out – generating calendar_dates' messaging/Qt layers needs more codegen groundwork than this task's scope (junction pagination, a first realextra_list_requestsconsumer, Qt parent-scoping). Moved to a four-task chain: Codegen: extend junction repository/service templates with paginated list_by filter → Codegen: generate calendar_date service/protocol/nats-handler layers using extra_list_requests → Codegen: design and implement Qt parent-scoping for has_readonly_paginated_list → Generate calendar_dates Qt facet and wire Browse Holidays action.
Plan
(Implementation strategy. Written when work starts; key decisions
are distilled into the parent story's * Decisions at close, but the
plan itself stays — it is the historical record of what we did.)
Notes
Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario, run
through the QA Validation Runner panel) that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
PRs
Review
| # | Comment summary | File | Decision | Notes |
|---|---|---|---|---|
| 1 | base_calendar_code combo has no blank option; write-back never produces std::nullopt – risks silently attaching an arbitrary base calendar on save | cpp_qt_detail_dialog.cpp.mustache, calendar.org | Fixed | Set combo_blank_label for the field (threads through the existing mechanism); added an is_optional_string branch to the is_dynamic_combo write-back section, using currentData() + nullopt-on-empty, mirroring the existing is_optional_uuid pattern (PartyDetailDialog's parent_party_id). |
| 2 | is_editable checkbox is a dead control – never read back into the entity, generates an empty if(createMode_) block | cpp_qt_detail_dialog.cpp.mustache, core.py | Fixed | Added an is_check_box branch to the locked-after-create sections of update…FromUi(), setCreateMode(), and setReadOnly() (all three had the same gap); also added is_check_box to core.py's locked_fields dict so the setCreateMode()/setReadOnly() template branches actually fire. |
Result
Three of four acceptance items shipped in PR #1707/#1700 (source/is_editable/base_calendar_code display, whole-form lock for non-editable calendars, "Regenerate up to <year>" action).
The fourth (Browse Holidays) turned out to need substantially more
codegen groundwork than this task's scope: calendar_date has no
service/protocol/nats-handler layer at all yet, the junction
repository/service templates have no paginated filtered-list
mechanism (extra_list_requests exists in the protocol/nats-handler
templates but has never had a real consumer), and the Qt
has_readonly_paginated_list knob has no way to scope a list window
to a parent key. Rather than freehand these as one-off hand-written
layers, split the remaining work into a four-task chain (see
Acceptance) so each piece lands as reusable codegen capability.
Closing this task on its three completed items.