Skip to content

Commit

Permalink
feat: debug miniapp frame link shortcut (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephancill authored Oct 7, 2024
1 parent 7cf57c8 commit 6f6dfc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-keys-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@frames.js/debugger": patch
---

feat: debug miniapp frame link shortcut
16 changes: 10 additions & 6 deletions packages/debugger/app/components/frame-debugger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ function FrameDiagnostics({ stackItem }: FrameDiagnosticsProps) {
{stackItem.speed > 5
? `Request took more than 5s (${stackItem.speed} seconds). This may be normal: first request will take longer in development (as next.js builds), but in production, clients will timeout requests after 5s`
: stackItem.speed > 4
? `Warning: Request took more than 4s (${stackItem.speed} seconds). Requests will fail at 5s. This may be normal: first request will take longer in development (as next.js builds), but in production, if there's variance here, requests could fail in production if over 5s`
: `${stackItem.speed} seconds`}
? `Warning: Request took more than 4s (${stackItem.speed} seconds). Requests will fail at 5s. This may be normal: first request will take longer in development (as next.js builds), but in production, if there's variance here, requests could fail in production if over 5s`
: `${stackItem.speed} seconds`}
</TableCell>
</TableRow>
{properties.validProperties.map(([propertyKey, value]) => {
Expand Down Expand Up @@ -622,10 +622,14 @@ export const FrameDebugger = React.forwardRef<
<div className="space-y-1">
{currentFrameStackItem?.status === "done" &&
currentFrameStackItem.frameResult.frame.buttons
?.filter((button) =>
button.target?.startsWith(
"https://warpcast.com/~/add-cast-action"
)
?.filter(
(button) =>
button.target?.startsWith(
"https://warpcast.com/~/add-cast-action"
) ||
button.target?.startsWith(
"https://warpcast.com/~/composer-action"
)
)
.map((button) => {
// Link to debug target
Expand Down

0 comments on commit 6f6dfc9

Please sign in to comment.