Skip to content

Make the Tauri command AppState rule consistent in src-tauri/src/AGENTS.md - #368

Merged
shingonoide merged 1 commit into
mainfrom
task-e0b65419-89ba-45db-baef-31c4998de272
Nov 18, 2026
Merged

shingonoide merged 1 commit into
mainfrom
task-e0b65419-89ba-45db-baef-31c4998de272

Conversation

@shingonoide

@shingonoide shingonoide commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Clarify the Tauri command state requirements in src-tauri/src/AGENTS.md to eliminate conflicting guidance.

Commands that need domain state must request tauri::State<'_, AppState> and access subordinate state through its fields. Commands that need no managed state do not require a tauri::State parameter. Separately registered managed state follows the existing rules in the Managed state section.

Changes

  • Align the Tauri Commands guidance with the existing Managed state section.
  • Explicitly prohibit requesting unregistered subordinate state types.
  • Preserve existing command signatures and state registration.

Validation

  • scripts/check-agent-docs.sh passed (agent-docs: OK).
  • Verified the guidance against existing Tauri command signatures.
  • Only src-tauri/src/AGENTS.md changed.

Fixes #358

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Tauri command guidance now says that commands needing managed state must request tauri::State<'_, AppState> and access subordinate state through an AppState field. It also says commands must not request subordinate state types.

Assessment against linked issues

Objective Addressed Explanation
Clarify when commands request AppState and prohibit requests for subordinate state types [#358] ✅

Possibly related PRs

  • BarraDev/slashit#359: Changes the same managed-state guidance but describes a conflicting rule about managed roots.

Change: Other

Merge Risk: Minimal · up to 0407e

This is a documentation-only clarification of how Tauri commands request managed state. It does not change runtime behavior, so the risk of merging is minimal.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the AGENTS.md file and the Tauri command AppState rule. The change makes that rule consistent across two passages, which matches the title. It is specific enough to describe the main c…
Description check Passed The description states the PR clarifies Tauri command state requirements in src-tauri/src/AGENTS.md, covering when commands request tauri::State<'_, AppState>, how they reach subordinate state through…
Persistent State Integrity Passed The check "Persistent state integrity" applies to changed code that mutates persisted application state. This PR changes only one file, src-tauri/src/AGENTS.md (one line, +1/-1). The change is documen…
Recoverable Resource Lifecycle Passed The check is about lifecycle code for worktrees, tasks, migrations, or cleanup. It can fail when a change clears the last persisted reference to a resource before cleanup succeeds, or when failed clea…
Platform Boundary Safety Passed The check is not applicable. The reviewed range changes one file, src-tauri/src/AGENTS.md (status M), per git diff --name-status against the review base and head refs. That file is Markdown guidan…
Full details: Title check

Explanation

The title names the AGENTS.md file and the Tauri command AppState rule. The change makes that rule consistent across two passages, which matches the title. It is specific enough to describe the main change and does not claim unrelated work.

Full details: Description check

Explanation

The description states the PR clarifies Tauri command state requirements in src-tauri/src/AGENTS.md, covering when commands request tauri::State<'_, AppState>, how they reach subordinate state through AppState fields, and that unregistered subordinate state types are prohibited. This matches the raw summary and the PR objectives, which both describe a one-line wording change to the same file. It also lists validation steps and a linked issue (#358).

Full details: Persistent State Integrity

Explanation

The check "Persistent state integrity" applies to changed code that mutates persisted application state. This PR changes only one file, src-tauri/src/AGENTS.md (one line, +1/-1). The change is documentation text about Tauri command state parameters. It contains no executable code, no persistence writes, no shared-memory publication, and no read-modify-write logic. The check does not apply, so it passes. The PR author is shingonoide (provider-reported); author identity is not part of this check.

Full details: Recoverable Resource Lifecycle

Explanation

The check is about lifecycle code for worktrees, tasks, migrations, or cleanup. It can fail when a change clears the last persisted reference to a resource before cleanup succeeds, or when failed cleanup has no recovery path. The pull request changes one file, src-tauri/src/AGENTS.md, a documentation-only edit that is the single entry in the changed-file inventory (M src-tauri/src/AGENTS.md). It changes no worktree, task, migration, or cleanup code. The check does not apply, so it passes.

Full details: Platform Boundary Safety

Explanation

The check is not applicable. The reviewed range changes one file, src-tauri/src/AGENTS.md (status M), per git diff --name-status against the review base and head refs. That file is Markdown guidance. It adds no Rust, build, or test code, and it touches no Unix- or Windows-specific API, module, type, or test. Command signatures and lib.rs state registration are unchanged, per the PR description and linked issue scope. No platform-gating or cross-platform compile risk is introduced. The check therefore passes.

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: BarraDev/slashit
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 27df25f
  • Layers: Repository YAML (base), Repository UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: bd83e074-d23d-484e-abe0-790a019232f6
Commits

Reviewing files that changed from the base of the PR and between 27df25f and 0407e3d.

Files selected for processing: 1

  • src-tauri/src/AGENTS.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@shingonoide
shingonoide merged commit cbee93a into main Nov 18, 2026
31 of 33 checks passed
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.

docs: reconcile AppState requirements in Tauri command guidance

1 participant