Skip to content

Add knowledge for frontend forms and profiles#8393

Open
pa-lem wants to merge 2 commits intorelease-1.8from
ple-focus-doc
Open

Add knowledge for frontend forms and profiles#8393
pa-lem wants to merge 2 commits intorelease-1.8from
ple-focus-doc

Conversation

@pa-lem
Copy link
Contributor

@pa-lem pa-lem commented Feb 16, 2026

Summary by CodeRabbit

Documentation

  • Added comprehensive guide on profile-based forms to frontend guidelines, including implementation patterns, code examples, and best practices for profile-driven form behavior.
  • Updated agent documentation references with enhanced guidance on focus management for form patterns.

@pa-lem pa-lem requested a review from a team as a code owner February 16, 2026 13:03
@github-actions github-actions bot added the group/frontend Issue related to the frontend (React) label Feb 16, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

Walkthrough

This pull request updates frontend documentation files. The primary change adds a new "Forms with Profiles" section to the object-forms guidelines, introducing profile-based forms, *WithProfileForm wrapper patterns, ProfileData type extensions, profile selection mechanics, value inheritance, form submission handling, and best practices with code examples. A secondary change updates a reference in AGENTS.md from forms.md to object-forms.md, with revised description text mentioning focus management for react-hook-form patterns.

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request has no description provided, missing all required sections from the template including Why, What changed, How to review, How to test, and Impact & rollout. Add a comprehensive pull request description covering the purpose, what changed in the guidelines, and why this documentation addition is important for the team.
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (19 files):

⚔️ backend/tests/component/cli/test_migrate.py (content)
⚔️ backend/tests/component/computed_attribute/conftest.py (content)
⚔️ backend/tests/component/computed_attribute/test_gather.py (content)
⚔️ backend/tests/component/core/graph/test_graph_constraints.py (content)
⚔️ backend/tests/component/core/hierarchy/test_hierarchy_create.py (content)
⚔️ backend/tests/component/core/hierarchy/test_hierarchy_update.py (content)
⚔️ backend/tests/component/core/node/test_node_field_name_update.py (content)
⚔️ backend/tests/component/core/node/test_template_pool_allocation.py (content)
⚔️ backend/tests/component/core/profiles/test_node_applier.py (content)
⚔️ backend/tests/component/locks/test_clean_up_deadlocks.py (content)
⚔️ backend/tests/component/menu/test_generator.py (content)
⚔️ backend/tests/component/patch/test_patch_runner.py (content)
⚔️ backend/tests/component/services/adapters/redis/test_redis.py (content)
⚔️ backend/tests/component/telemetry/test_task_manager.py (content)
⚔️ backend/tests/component/test_database.py (content)
⚔️ backend/tests/component/trigger/test_tasks.py (content)
⚔️ dev/guidelines/frontend/object-forms.md (content)
⚔️ frontend/app/AGENTS.md (content)
⚔️ pyproject.toml (content)

These conflicts must be resolved before merging into release-1.8.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding documentation about frontend forms with profile patterns, which is the primary focus of the diff.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@dev/guidelines/frontend/object-forms.md`:
- Around line 218-223: Update the "Value Inheritance" section to explicitly
state how profile_priority is compared: specify that profiles with a higher
numeric profile_priority take precedence (i.e., larger value wins) when multiple
profiles provide the same field, and define the deterministic tie-breaker (e.g.,
the later profile in the selection list wins) so implementations of the Value
Inheritance behavior and fields using profile_priority are unambiguous.

Comment on lines +218 to +223
2. **Value Inheritance** - When profiles are selected:
- Form fields check for values in the selected profiles
- Profile values populate as defaults with `source: { type: "profile", id, kind, label }`
- User can override profile values (changes source to `"user"`)
- Priority order determines which profile wins if multiple provide same field

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify profile priority ordering to avoid ambiguous inheritance.

The doc states priority determines which profile wins but doesn’t specify whether higher or lower profile_priority takes precedence. Please add a sentence defining the ordering to prevent inconsistent implementations.

✍️ Suggested doc tweak
-   - Priority order determines which profile wins if multiple provide same field
+   - Priority order determines which profile wins if multiple provide same field (e.g., higher `profile_priority` wins)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
2. **Value Inheritance** - When profiles are selected:
- Form fields check for values in the selected profiles
- Profile values populate as defaults with `source: { type: "profile", id, kind, label }`
- User can override profile values (changes source to `"user"`)
- Priority order determines which profile wins if multiple provide same field
2. **Value Inheritance** - When profiles are selected:
- Form fields check for values in the selected profiles
- Profile values populate as defaults with `source: { type: "profile", id, kind, label }`
- User can override profile values (changes source to `"user"`)
- Priority order determines which profile wins if multiple provide same field (e.g., higher `profile_priority` wins)
🤖 Prompt for AI Agents
In `@dev/guidelines/frontend/object-forms.md` around lines 218 - 223, Update the
"Value Inheritance" section to explicitly state how profile_priority is
compared: specify that profiles with a higher numeric profile_priority take
precedence (i.e., larger value wins) when multiple profiles provide the same
field, and define the deterministic tie-breaker (e.g., the later profile in the
selection list wins) so implementations of the Value Inheritance behavior and
fields using profile_priority are unambiguous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/frontend Issue related to the frontend (React)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant