feat(data): consolidate Huf Data Tables - #460
Merged
esafwan merged 41 commits intoJul 26, 2026
Merged
Conversation
Add get_table_agent_access / set_table_agent_access to huf/huf/doctype/huf_data_table/api.py: from a HUF Table, scaffold deterministic Agent Tool Function docs (view -> Get List + Get Document, create/edit/delete -> Create/Update/Delete Document), attach/detach them on an agent's agent_tool child table idempotently, and report which agents have access. Tool docs are reused by deterministic name and never deleted on uncheck. params/function_definition are left to the Agent Tool Function controller's auto-generation. Adds IntegrationTestCase suite (8 tests) covering scaffolding shape, idempotency, detach semantics, get/set round-trip, partial-view state, and the flows.manage capability guard.
Create/Update/Get List tools scaffolded via set_table_agent_access now get Agent Function Params rows built from the table's DocType meta, so the generated function_definition exposes the real fields (previously Create had empty properties with additionalProperties: false). Re-running refreshes parameters compare-then-save; layout/hidden/read-only fields are excluded; reqd maps to required only on Create tools.
Add TableAgentAccessModal (agent picker + View/Create/Edit/Delete checkboxes) wired to the huf_data_table agent-access endpoints, entry points on the data list page and table view kebab, and a bulk-fetched "N agents" badge on table cards (2 REST calls, no N+1).
…ndly modal error
BUG-1: the 'N agents' badge could never render — the frontend computed
counts by REST-listing the Agent Tool child table, and Frappe strips all
fields from child-table rows queried without a parent context, so the
grouping always yielded {}. Add get_tables_agent_counts() (flows.use),
reusing _compute_access so distinct agents are counted server-side in one
call, and point the frontend at it. The dead child-table REST code (and
the doctype map entry it needed) is removed.
BUG-2: the access modal's error state showed raw JS error text. It now
shows a friendly message and logs the technical detail to the console.
Also replaces two pre-existing 'as any' filter casts in dataTableApi.ts
with an explicit getDocList filter type so the touched file is
eslint-clean.
…cList call Instead of calling getTableSchema which requires a registry record name, use direct db.getDocList query on 'Huf Data Table' to resolve the target doctype's schema (specifically title_field_name) using the doctype_name.
…consolidation/data-tables
…o consolidation/data-tables
… into consolidation/data-tables
…solidation/data-tables
… consolidation/data-tables
…to consolidation/data-tables
…consolidation/data-tables
This was referenced Jul 26, 2026
Closed
feat: tabs/sections/columns form layout for data tables, mirroring Frappe's own DocType builder
#457
Closed
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.
Consolidated scope
Single review surface for the Huf Data Tables feature set.
Original PRs
Integration notes
Overlapping form, API, and service changes were merged by preserving the combined behavior. Agent-access scaffolding and bulk import remain wired into the same Data Table permissions and generated-tool model.
Targets
integration/huf-consolidation-2026-07; included in final integration PR #468.