Skip to content

Some local fixes#79

Merged
dev-jodee merged 5 commits intosolana-program:mainfrom
Woody4618:local-fixes
May 1, 2026
Merged

Some local fixes#79
dev-jodee merged 5 commits intosolana-program:mainfrom
Woody4618:local-fixes

Conversation

@Woody4618
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Collaborator

@dev-jodee dev-jodee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed locally — 3 fixes. 2 suggested inline below; the 3rd is on a file outside this PR's diff (button-nesting bug surfaced while testing).

3rd fix — button-nesting (webapp/src/components/plan/enhanced-collect-payments.tsx)

React warning: <button> cannot contain a nested <button>. Outer toggle wraps inner SolanaButton (Collect). Outer should be a <div role="button"> with keyboard handlers.

-            <button
+            <div
+                role="button"
+                tabIndex={0}
+                aria-expanded={expanded}
                 className="w-full p-4 flex items-center justify-between cursor-pointer hover:bg-sand-100 transition-colors"
                 onClick={() => setExpanded(!expanded)}
+                onKeyDown={e => {
+                    if (e.key === 'Enter' || e.key === ' ') {
+                        e.preventDefault();
+                        setExpanded(!expanded);
+                    }
+                }}
             >

And close tag at line 346:

-            </button>
+            </div>

Happy to land it in this PR or open a follow-up — your call.

Separate design discussion

While reviewing, also flagged: subscriber can break delegation off-chain (revoke SPL Token approve, change delegate, drain ATA, close ATA) — leaves subscription PDA stuck open with expires_at_ts == 0, plan owner can't cancel. Considering a cancel_broken_subscription instruction with permissionless eviction + on-chain proof. Will open separately, not blocking this PR.

Comment thread webapp/api/server.ts Outdated
Comment thread webapp/api/server.ts Outdated
dev-jodee added 2 commits May 1, 2026 12:47
Two fixes to deployProgramViaSurfnet:

- Use PROGRAM_ADDRESS instead of undefined PROGRAM_ID when injecting
  the address into IDL JSON. Previously threw ReferenceError whenever
  the IDL lacked a top-level address field.
- Kick off the fallback deploy as fire-and-forget rather than awaiting
  it inside the status handler. The status endpoint is polled by the
  frontend; awaiting blocked the response for up to 30s during deploy.
  Next poll picks up executable=true.
EnhancedPlanCard wrapped a SolanaButton inside a native <button>,
which produced a React hydration warning ("button cannot contain a
nested button"). Outer toggle is now a <div role="button"> with
tabIndex, aria-expanded, and Enter/Space keyboard handlers so it
remains keyboard-accessible.
@dev-jodee dev-jodee marked this pull request as ready for review May 1, 2026 16:59
dev-jodee
dev-jodee previously approved these changes May 1, 2026
`idl_path` in surfnet-setup runbook adds an on-chain IDL upload, pushing
total deploy time past the 7s retry budget — bump to 30×2s.

`pull_request` events on fork PRs ship a read-only GITHUB_TOKEN
regardless of the workflow `permissions:` block, so the CU-report
comment step 403s. Gate it on same-repo PRs.
surfpool's setup_surfnet runs an automatic protocol-detection step that
attempts an anchor-style IDL conversion. The Codama-emitted IDL has no
top-level `address` field, so the conversion errors and the deploy
step never completes — leaving the program account empty after start.

Result: ts-integration-test sees `getAccountInfo` for the program ID
return null indefinitely. Revert to main's content; rely on
`just deploy-idl-{devnet,mainnet}` (program-metadata) for on-chain IDL.
@dev-jodee dev-jodee merged commit 733c7a2 into solana-program:main May 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants