Skip to content

refactor: Refactor autofill use registry - #277

Draft
OCopping wants to merge 5 commits into
mainfrom
refactor-autofill-use-registry
Draft

OCopping wants to merge 5 commits into
mainfrom
refactor-autofill-use-registry

Conversation

@OCopping

Copy link
Copy Markdown
Collaborator

Summary

Updates the autofiller to support entity registry fallback, allowing widget names in index.bob to match
either techui.yaml components or individual entity PVs from the registry.

Depends on PR #276 (refactor-builder-registry).

Changes

  • autofill.py — Added entities parameter to Autofiller; _autofill_from_path() falls back to entity registry when widget not in gui_components; replace_content() handles Component | Entity
  • main_app.py — Pass gui.entities to Autofiller
  • tests/test_autofiller.py — Updated tests for entity fallback and priority; new tests for replace_content() with Entity
  • tests/conftest.py — New autofiller_index_trees, autofiller, and autofiller_with_entities fixtures

…eModel for the screen dict in techui-support yaml entities
Also added new 'base_prefix' computed value for Entity to just return
the PV prefix without any colons or suffixes
… there is not a matching component in the component dict, and added tests

This logic will most likely be flipped when the index.bob file becomes
the main source of truth in #275
@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.77465% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.29%. Comparing base (2dd3dc6) to head (c2811e2).

Files with missing lines Patch % Lines
src/techui_builder/generate.py 91.30% 2 Missing ⚠️
src/techui_builder/builder.py 96.55% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #277      +/-   ##
==========================================
- Coverage   96.55%   96.29%   -0.27%     
==========================================
  Files          17       17              
  Lines        1075     1106      +31     
==========================================
+ Hits         1038     1065      +27     
- Misses         37       41       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@OCopping OCopping changed the title feat: Refactor autofill use registry refactor: Refactor autofill use registry Sep 30, 2026

This branch has not been deployed

No deployments
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.

1 participant