mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 00:02:29 +00:00
refactor(mobile): let each module build its own Linear team reader
`linearTeamListReader` was exported from the detail-operations module only so the list-operations module could import it, which adds an operations-to-operations import edge that buys nothing: `rpcResultVariant` is a pure factory, so two calls with the same schema produce two functionally identical readers. What keeps the composer's picker and the saved-selection reconciler agreeing about a team row is that both build from `linearTeamsSchema`, which is already exported. Deleting the export also puts the composer-policy JSDoc back on `linearComposerTeamListRead`. JSDoc binds to the next declaration, so the block explaining why this method carries two operations with different acceptance policies had drifted onto the reader, leaving the operation it is about undocumented. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
This commit is contained in:
@@ -102,18 +102,16 @@ export const linearTeamStateListRead = bindDeferredRpcOperation(
|
||||
/**
|
||||
* The composer's Linear team list, the first of two policies on this method. The composer empties
|
||||
* its picker on a refusal and stays open; hydration in mobile-task-list-operations.ts cannot
|
||||
* proceed without the list and surfaces the host's message. One reader serves both.
|
||||
* proceed without the list and surfaces the host's message. Both build their reader from
|
||||
* `linearTeamsSchema`, which is what keeps them agreeing about what a team row is; the reader
|
||||
* itself is a pure factory and there is nothing to share.
|
||||
*/
|
||||
/** Shared with hydration's leg in the list module: one team list, so the composer's picker and
|
||||
* the saved-selection reconciler can never disagree about what a team row is. */
|
||||
export const linearTeamListReader = rpcResultVariant('linear-teams', linearTeamsSchema)
|
||||
|
||||
export const linearComposerTeamListRead = bindDeferredRpcOperation(
|
||||
defineRpcOperation({
|
||||
name: 'linear.composer-team-list-or-skip',
|
||||
method: 'linear.listTeams',
|
||||
acceptance: 'success-result-or-skip',
|
||||
barrier: 'after-caller-barrier',
|
||||
read: linearTeamListReader
|
||||
read: rpcResultVariant('linear-teams', linearTeamsSchema)
|
||||
})
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { bindDeferredRpcOperation, defineRpcOperation } from '../transport/rpc-operation'
|
||||
import { rpcResultVariant } from '../transport/rpc-operation-result-reader'
|
||||
import { linearTeamListReader } from './mobile-task-item-detail-operations'
|
||||
import { linearTeamsSchema } from './task-item-detail-reply-schema'
|
||||
import {
|
||||
githubWorkItemCountSchema,
|
||||
gitlabTodoListSchema,
|
||||
@@ -41,7 +41,7 @@ export const linearWorkspaceTeamListRead = bindDeferredRpcOperation(
|
||||
method: 'linear.listTeams',
|
||||
acceptance: 'require-result-or-throw-message',
|
||||
barrier: 'after-caller-barrier',
|
||||
read: linearTeamListReader
|
||||
read: rpcResultVariant('linear-teams', linearTeamsSchema)
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user