Skip to content

Standardize all Server Actions to return ActionResult<T> #149

Description

@ryota-murakami

Summary

Some server actions return raw data or throw errors instead of using the ActionResult<T> discriminated union pattern.

Source

Semantic Review SR-002 (2026-02-18), verified 2026-02-25

Current State (verified)

File Returns ActionResult Notes
board.ts Partial — withAuth functions return raw T 4 functions use withAuth (raw), 6 use withAuthResultRateLimit (ActionResult)
repo-cards.ts ✅ Yes Uses inline auth but returns { success, data/error }
user-presets.ts ✅ Yes Returns ActionResult<T>
user-settings.ts ✅ Yes Via withAuthResultRateLimit
maintenance-project-info.ts ✅ Yes Via withAuthResultRateLimit
project-info.ts ✅ Yes Delegates to shared core

Non-compliant functions in board.ts:

  • updateStatusList (line 199) — withAuth
  • deleteStatusList (line 262) — withAuth
  • updateStatusListPosition (line 387) — withAuth
  • updateBoard (line 592) — withAuth

Acceptance Criteria

  • All 4 withAuth functions in board.ts migrated to withAuthResultRateLimit
  • Client callers updated to handle ActionResult
  • No runtime behavior changes
  • All tests passing

Priority

🔴 High — Architecture pattern consistency

Notes

This is closely related to #150 (auth guard unification). Resolving #150 first will naturally fix this issue.

Activity

  1. added a commit that references this issue on Feb 25, 2026
    7df7fa8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions