Skip to content

[AI] docs(api): drop the orphaned Payee Rule type - #8698

Merged
matt-fidd merged 1 commit into
actualbudget:masterfrom
agigante80:docs/payee-rule-shape
Aug 11, 2026
Merged

matt-fidd merged 1 commit into
actualbudget:masterfrom
agigante80:docs/payee-rule-shape

Conversation

@agigante80

@agigante80 agigante80 commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

The API reference documented a Payee Rule type with a required payee_id field. No API method returns an object with that field, and none accepts a payeeRule, so the type was documentation-only.

getPayeeRules returns ordinary serialized Rule objects: packages/loot-core/src/server/payees/app.ts returns rules.getRulesForPayee(id).map(rule => rule.serialize()) typed as Promise<RuleEntity[]>, and Rule.serialize() emits exactly { id, stage, conditionsOp, conditions, actions }. The reference already agreed, annotating getPayeeRules as returns="Promise<Rule[]>" two lines below that struct.

This PR:

  • removes the payeeRule entry from types.jsx and the #### Payee Rule section from reference.md
  • removes "Payee rule" from the Rules APIList, whose #payee-rule anchor would otherwise point at a deleted heading
  • explains the association under getPayeeRules instead: a rule belongs to a payee when one of its conditions or actions has a payee field referencing that id, so there is no payee_id on the returned rules

Context on why this matters in practice: I maintain an MCP server on top of @actual-app/api and implemented the payee-rules lookup with a rule.payee_id === payeeId filter taken from this table. The field does not exist, so the filter matched nothing and the tool returned an empty list for every payee for months.

Researched and drafted with Claude Code; the diff was reviewed and verified by me.

Related issue(s)

Closes #8697

Related to #8682, which reports the wrong stage value list on the sibling Rule table. Kept separate deliberately so a one-line wording fix does not wait on this one. The two touch different blocks of types.jsx and merge in either order.

Testing

Docs-only change, verified on this PR's Netlify deploy preview (https://deploy-preview-8698.www.actualbudget.org/docs/api/reference/):

  • the Payee Rule heading and struct table are gone
  • the Rules navigation list no longer offers a dead #payee-rule link
  • the new getPayeeRules paragraph renders correctly

Also confirmed there are no remaining references to objects.payeeRule anywhere in the repo, and that oxfmt --check packages/docs/docs/api/types.jsx passes against .oxfmtrc.json.

Checklist

  • Release notes added (see link above) — not applicable: every changed file is under packages/docs/, which release-notes.yml exempts via only_docs. check-release-notes passes.
  • No obvious regressions in affected areas
  • Self-review has been performed - I have read every line of this diff and can explain what each change does and why it is needed

getPayeeRules returns ordinary Rule objects: packages/loot-core/src/server/payees/app.ts
returns rules.getRulesForPayee(id).map(rule => rule.serialize()), and Rule.serialize()
emits exactly { id, stage, conditionsOp, conditions, actions }. There is no payee_id on
the returned objects, and no API method accepts or returns a payeeRule, so the type was
documentation-only. The reference already annotates getPayeeRules as Promise<Rule[]>.

Remove the Payee rule entry from the Rules APIList too, since its anchor pointed at the
deleted heading, and explain the payee association under getPayeeRules instead: it is
carried by a condition or action on the payee field rather than by a column.

Closes actualbudget#8697
@actual-github-bot actual-github-bot Bot changed the title [AI] docs(api): drop the orphaned Payee Rule type [WIP] [AI] docs(api): drop the orphaned Payee Rule type Aug 10, 2026
@netlify

netlify Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit dc1b056
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/6a799f2649fe2200085ffdac
😎 Deploy Preview https://deploy-preview-8698.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hello contributor!

We would love to review your PR! Before we can do that, please make sure:

  • ✅ All CI checks pass
  • ✅ The PR is moved from draft to open (if applicable)
  • ✅ The "[WIP]" prefix is removed from the PR title
  • ✅ The PR description follows the provided template, with all checklist boxes filled in
  • ✅ All CodeRabbit code review comments are resolved (if you disagree with anything - reply to the bot with your reasoning so we can read through it). The bot will eventually approve the PR.
  • ✅ Any AI usage is disclosed (see our AI Usage Policy)

A quick note on volume: please get one PR reviewed and merged before opening several more. A stack of simultaneous, similar PRs from one author is reviewed slowly, and low-effort, untested, or undisclosed-AI PRs may be closed without a detailed review.

We do this to reduce the TOIL the core contributor team has to go through for each PR and to allow for speedy reviews and merges.

For more information, please see our Contributing Guide.

@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

✅ Deploy Preview for actualbudget-website ready!

Name Link
🔨 Latest commit dc1b056
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget-website/deploys/6a799f264f012f0008811219
😎 Deploy Preview https://deploy-preview-8698.www.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Rules API documentation removes the obsolete Payee Rule type and updates getPayeeRules to describe ordinary Rule objects with payee associations defined by conditions or actions.

Changes

Rules API documentation

Layer / File(s) Summary
Remove obsolete Payee Rule type
packages/docs/docs/api/types.jsx, packages/docs/docs/api/reference.md
The exported payeeRule schema and separate Payee Rule reference entry were removed. The getPayeeRules documentation now describes its Rule response and payee association fields.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

  • actualbudget/actual issue 8697 — Requests removal of the obsolete Payee Rule type and clarification of getPayeeRules.

Suggested labels: documentation

Suggested reviewers: matissjanis

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes removal of the orphaned Payee Rule type from the API documentation.
Description check ✅ Passed The description directly explains the documentation changes, their rationale, testing, and issue context.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@agigante80 agigante80 changed the title [WIP] [AI] docs(api): drop the orphaned Payee Rule type [AI] docs(api): drop the orphaned Payee Rule type Aug 10, 2026

@matt-fidd matt-fidd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@matt-fidd
matt-fidd added this pull request to the merge queue Aug 11, 2026
Merged via the queue into actualbudget:master with commit a725cd8 Aug 11, 2026
35 checks passed
@agigante80

Copy link
Copy Markdown
Contributor Author

Thanks

Thanks to you matt-fidd and the team for the work you have been doing!
🤗

RafaelEspino pushed a commit to RafaelEspino/actual that referenced this pull request Oct 28, 2026
getPayeeRules returns ordinary Rule objects: packages/loot-core/src/server/payees/app.ts
returns rules.getRulesForPayee(id).map(rule => rule.serialize()), and Rule.serialize()
emits exactly { id, stage, conditionsOp, conditions, actions }. There is no payee_id on
the returned objects, and no API method accepts or returns a payeeRule, so the type was
documentation-only. The reference already annotates getPayeeRules as Promise<Rule[]>.

Remove the Payee rule entry from the Rules APIList too, since its anchor pointed at the
deleted heading, and explain the payee association under getPayeeRules instead: it is
carried by a condition or action on the payee field rather than by a column.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🤖 [Docs] - The Payee Rule type documents a payee_id field that getPayeeRules never returns

2 participants