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_code exist on the domain type and in the database (since step 4) but are not shown anywhere in the UI, and nothing stops editing a source'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 has is_editable=false. Also add a "Regenerate up to <year>" action wired to the refdata.v1.calendar_dates.regenerate NATS 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

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

PR Title
#1707 [ores.refdata,ores.codegen] Calendar Regenerate-up-to-year action
#1700 [ores.refdata,ores.codegen] Calendar detail dialog: source/editability/base template

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.

Emacs 29.3 (Org mode 9.6.15)