MCPcopy Index your code
hub / github.com/callstack/agent-device / buildScrollEdgeVerificationError

Function buildScrollEdgeVerificationError

src/utils/scroll-edge-state.ts:135–159  ·  view source on GitHub ↗
(
  edge: ScrollEdge,
  scope: string | undefined,
  cause: unknown,
)

Source from the content-addressed store, hash-verified

133}
134
135function buildScrollEdgeVerificationError(
136 edge: ScrollEdge,
137 scope: string | undefined,
138 cause: unknown,
139): AppError {
140 if (scope) {
141 return new AppError(
142 'COMMAND_FAILED',
143 `Failed to verify scroll ${edge} state for scoped container`,
144 {
145 scope,
146 hint: `scroll ${edge} could not verify the scoped scroll container. Run snapshot -i for the current screen and retry with a visible scroll target.`,
147 },
148 cause,
149 );
150 }
151 return new AppError(
152 'COMMAND_FAILED',
153 `Failed to verify scroll ${edge} state`,
154 {
155 hint: `scroll ${edge} needs a snapshot showing hidden content ${edge === 'bottom' ? 'below' : 'above'} before it will move.`,
156 },
157 cause,
158 );
159}
160
161function ensureSnapshotNodes(nodes: readonly (RawSnapshotNode | SnapshotNode)[]): SnapshotNode[] {
162 return nodes.map((node, index) => ({

Callers 1

captureScrollEdgeStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected