Weaver graphical UI - #981
Merged
Merged
Conversation
…into weaver-graphical-ui # Conflicts: # .gitignore
apply_llm_draft_payload stored llm_draft_typical_role and
llm_draft_form_type but never promoted them to the live typical_role /
form_type / court_related fields the way it already does for title,
intro_prompt, description, etc.
Because typical_role is set early by _guess_role(), the weaver question
at assembly_line.yml:118 is never shown (variable already defined), so
the LLM's better classification was silently discarded. The generated
interview then emitted a bare 'user_ask_role' reference (asking the end
user) instead of 'user_ask_role = "plaintiff"' when the LLM correctly
identified the role.
Fix: when the LLM payload contains a confident role ('plaintiff' or
'defendant'), override the heuristic value. An LLM 'unknown' result
leaves the heuristic value intact so a keyword match isn't downgraded.
form_type (and the derived court_related) are applied for any valid
value, matching the apply=True path of llm_prefill_metadata.
Add four regression tests covering the new behaviour.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add _PersonObjectSpec dataclass and _PERSON_DEFAULT_PARAMS constant matching AssemblyLine's ql_baseline.yml defaults (users, children, witnesses, decedents, guardians_ad_litem) - Add DAFieldList._guess_people_quantities(): reads final_display_var patterns like users[0].name.first to detect max index per person type and returns 'one' or 'more' quantity hints - Add DAInterview._guess_objects_list(): builds objects list using person candidates + quantity heuristics; mirrors assembly_line.yml consolidation (defendants+plaintiffs → other_parties); always includes users - Add _normalize_objects() helper: converts DAObjects to _PersonObjectSpec, filling empty params from field heuristics then per-person defaults - Update generate_interview_artifacts() to accept optional objects list; auto-calls _guess_objects_list() when None; normalizes passed objects so empty params get sensible defaults instead of bare ALPeopleList - Update assembly_line.yml to pass objects=list(objects) so user's explicit quantity answers are respected in manual (non-lucky) mode; in lucky mode objects have empty params so heuristics fill them in - Add regression tests: _guess_people_quantities unit tests, objects block always generated, explicit objects respected Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
serialize_order_steps produced 2-space-indented Python code intended for direct YAML embedding. When that string was set as a Python dict value and serialized via canonical_block_yaml/yaml.dump, PyYAML saw a string starting with spaces and emitted the explicit indentation indicator |2. Docassemble does not handle |2 reliably. Fix: change _append_steps(steps, 2) to _append_steps(steps, 0) so serialize_order_steps produces clean 0-indent Python code. PyYAML then handles indentation itself and emits plain |. The raw YAML fallback path in api_editor.py (used when no existing order block is found) now explicitly indents code_body lines with 2 spaces when building the YAML string directly. Update the two serialize_order_steps tests to expect 0-indent output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
Merging as placeholder; this doesn't break any existing functionality, just adds the alpha graphical layer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.