Skip to content

docs(agents): capture review-derived coding patterns - #2951

Merged
AndyScherzinger merged 1 commit into
mainfrom
docs/noid/agents-md-review-patterns
Sep 4, 2026
Merged

docs(agents): capture review-derived coding patterns#2951
AndyScherzinger merged 1 commit into
mainfrom
docs/noid/agents-md-review-patterns

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

Extends AGENTS.md with coding patterns distilled from the review feedback by @enjeck and @samin-z on the personal-archiving PR #2476, so future contributions get these details right from the start instead of rediscovering them in review.

Added to the Architecture Patterns section:

  • RequirePermission for contexts — the middleware only accepts integer node types for tables/views; context endpoints must use typeParam: 'context', never an integer NODE_TYPE_CONTEXT.
  • node_type column types differ per tabletables_shares.node_type stores strings while other tables store integer constants; always convert via ConversionHelper, never compare directly.
  • Per-user resolved state in API responses — every endpoint returning an entity with per-user overrides (including single-item GETs) must resolve the value for the requesting user.
  • Migration file naming — rename a long-lived PR's migration to the current target app version and a current date before merge.
  • Cleanup of materialized per-user state on access loss — which listeners to wire (group/circle member removal, group/circle deletion, share deletion, user deletion) and to verify remaining access via PermissionsService first.
  • Atomic upserts — use the portable IDBConnection::setValues() instead of read-modify-write or vendor-specific SQL.

Added to the Frontend section:

  • Guard findIndex() results against -1 in Pinia store actions; on Vue 3, direct array index assignment is reactive, so no splice() workarounds.

🖼️ Screenshots

Not applicable — documentation-only change (AGENTS.md).

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

AI disclosure: This change was AI-assisted — written with Claude Code (model claude-fable-5) and reviewed by the human contributor before submission.

🤖 Generated with Claude Code

Codify recurring findings from the personal-archiving reviews (context permission attribute, node_type string vs int, per-user resolved API state, migration naming, access-loss cleanup, portable upserts, Vue 3 store guards) so future changes follow them from the start.

Assisted-by: ClaudeCode:claude-fable-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger added this to the v2.4.0 milestone Sep 4, 2026
@AndyScherzinger
AndyScherzinger merged commit 8fe77f6 into main Sep 4, 2026
63 checks passed
@AndyScherzinger
AndyScherzinger deleted the docs/noid/agents-md-review-patterns branch September 4, 2026 19:02
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.

3 participants