Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: debug miniapp frame link shortcut #503

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading