Skip to content

Add Modelar Word engine (B-1.5.2) with scoped substitution and guide#10

Open
hubertdungen wants to merge 4 commits into
mainfrom
feature/modelar-motor-b1.5.2
Open

Add Modelar Word engine (B-1.5.2) with scoped substitution and guide#10
hubertdungen wants to merge 4 commits into
mainfrom
feature/modelar-motor-b1.5.2

Conversation

@hubertdungen

Copy link
Copy Markdown
Owner

Implement ModelarMotorWord, which executes the expanded Modelar plan
against Word interop: open the base O.S. model once, prepare headers
and page numbering like the classic flow, then per operation open and
copy the fragment document, paste it at the end of the output, run the
Excel triage for the operation's day, and fill the escala tags only
inside the freshly pasted range via the new
Word_Processor.SubstituirVariaveisNoRange (scoped Range.Find with
wdFindStop) — the per-day capability the classic wdReplaceAll flow
could not provide. Word always closes on error.

Wire it opt-in in FormExport: the engine runs only when
modelar_programa.json exists beside SIPOS.exe (day list from the
B-1.3.2 start/end range when active, otherwise the holiday-aware
PlaneadorDeDias); without the file the classic flow runs untouched.
Expose the selected calendar range through Mediator.

Add docs/GUIA-MODELAR.md (concept, action types, JSON format, Windows
test script) and docs/modelar_programa.exemplo.json, verified to load,
validate and expand with the real code. Version bumped to v B-1.5.2.
Windows validation (B-1.5.4) pending before merge to main.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK

claude added 4 commits July 9, 2026 23:53
Implement ModelarMotorWord, which executes the expanded Modelar plan
against Word interop: open the base O.S. model once, prepare headers
and page numbering like the classic flow, then per operation open and
copy the fragment document, paste it at the end of the output, run the
Excel triage for the operation's day, and fill the escala tags only
inside the freshly pasted range via the new
Word_Processor.SubstituirVariaveisNoRange (scoped Range.Find with
wdFindStop) — the per-day capability the classic wdReplaceAll flow
could not provide. Word always closes on error.

Wire it opt-in in FormExport: the engine runs only when
modelar_programa.json exists beside SIPOS.exe (day list from the
B-1.3.2 start/end range when active, otherwise the holiday-aware
PlaneadorDeDias); without the file the classic flow runs untouched.
Expose the selected calendar range through Mediator.

Add docs/GUIA-MODELAR.md (concept, action types, JSON format, Windows
test script) and docs/modelar_programa.exemplo.json, verified to load,
validate and expand with the real code. Version bumped to v B-1.5.2.
Windows validation (B-1.5.4) pending before merge to main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK
FormModelar now edits modelar_programa.json directly: each row gains an
action-type ComboBox (cloned rows inherit items and selection via a new
CloneControls branch), and new top-menu buttons save the visible rows
as a LoopDias program (validated before writing) or reload them from
the saved file, which also auto-populates the rows on form load.

Implement the previously empty SwitchRowActivationState stub: the
check button now toggles and displays the row's Ativa state, dimming
disabled rows, which the export engine skips. Dock the open-file
button on the right so the growing docked button stack cannot overlap
it. Update the Modelar guide with the UI chapter and refresh the
experimental portable artifact in dist/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK
Replace the native ComboBox in the Modelar rows with the project's own
CustomComboBox control (custom border, drawn arrow icon, styled
dropdown), themed to the SIPOS dark palette. CloneControls gains a
dedicated branch that builds a fresh CustomComboBox per cloned row,
copying the selected type and skipping child recursion since the
composite control constructs its internals in its constructor. Refresh
the experimental portable artifact in dist/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK
Give the previously dead selector panel its intended function: the
template ComboBox lists the classic program plus one entry per action
type, and the add button inserts the chosen program (three
preconfigured rows) or a single row of that type, reusing the first
empty row and generating unique names so validation never blocks fresh
rows. The hint box now switches its text with the Programar/Ficheiros
menu, whose clicks were previously style-only. Widen the row maximum
width from 800 to 1400 pixels so the crowded rows can spread in wider
windows. Refresh the experimental portable artifact in dist/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants