Skip to content

Conversation

adamegyed
Copy link
Collaborator

@adamegyed adamegyed commented Sep 16, 2025

Fern doesn't correctly support twoslash, so it breaks the rendering of a <CodeBlocks> tag by making tabs inaccessible and disabling the code focus/highlighting and the max code block height.

Removing twoslash from these docs for now until Fern adds support for twoslash.

Cases found with the regex <CodeBlocks>[\s\S]*?twoslash[\s\S]*?</CodeBlocks>, which had 1 false positive due to non-<CodeBlocks> section in between two <CodeBlocks> sections.. Also had to remove from nested <Markdown ... inclusions.

Pull Request Checklist


PR-Codex overview

This PR primarily updates the documentation files, changing code block annotations from twoslash to standard code block formatting. This enhances clarity and consistency across various documentation pages.

Detailed summary

  • Changed twoslash annotations to standard code block formatting in multiple .mdx files.
  • Updated file references in code examples to improve accuracy.
  • Added new code snippets and examples for various components, including signer, client, and configuration files.
  • Enhanced documentation for authentication methods and transaction handling.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Sep 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
aa-sdk-ui-demo Ready Ready Preview Comment Sep 16, 2025 7:53pm

Copy link
Contributor

graphite-app bot commented Sep 16, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link

github-actions bot commented Sep 16, 2025

🌿 Documentation Preview

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Sep 16, 2025, 7:51 PM

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes TypeScript twoslash directives from code blocks within <CodeBlocks> components due to Fern's lack of support for twoslash, which was causing rendering issues including inaccessible tabs, disabled code focus/highlighting, and broken max height constraints.

Key changes:

  • Systematic removal of twoslash from all code block language specifiers within <CodeBlocks> tags
  • Code examples remain functionally unchanged, only the language specification is modified
  • Affects documentation files across multiple categories including smart contracts, transactions, authentication, and SDK reference materials

Reviewed Changes

Copilot reviewed 66 out of 66 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/shared/smart-contracts/session-keys/full-example.mdx Removed twoslash from TypeScript code block
docs/shared/smart-contracts/session-keys/base-client.mdx Removed twoslash from TypeScript code block with filename
docs/shared/smart-contracts/multisig-client.mdx Removed twoslash from TypeScript code block with filename
docs/shared/smart-contracts/multi-owner-light-account-client.mdx Removed twoslash from TypeScript code block with filename
docs/shared/smart-contracts/modular-account-client.mdx Removed twoslash from TypeScript code block with filename
docs/shared/smart-contracts/light-account-client.mdx Removed twoslash from TypeScript code block with filename
docs/shared/signer/wallet-client-signer.mdx Removed twoslash from TypeScript code block with filename
docs/shared/signer/signer.mdx Removed twoslash from TypeScript code block with filename
docs/shared/react-native/account-provider-setup.mdx Removed twoslash from two TypeScript code blocks with filenames
docs/shared/infra/mav2-client.mdx Removed twoslash from two TypeScript code blocks within CodeBlocks
docs/shared/infra/client.mdx Removed twoslash from TypeScript code block with filename
docs/shared/core/ssr-config.mdx Removed twoslash from TypeScript code block with filename
docs/shared/core/config.mdx Removed twoslash from TypeScript code block with filename
docs/pages/troubleshooting/server-side-rendering.mdx Removed twoslash from multiple TypeScript/TSX code blocks within CodeBlocks
docs/pages/transactions/using-eip-7702/react.mdx Removed twoslash from TSX code block with focus attribute
docs/pages/transactions/using-eip-7702/client.mdx Removed twoslash from two TSX/TypeScript code blocks
docs/pages/transactions/sponsor-gas/react.mdx Removed twoslash from TSX and TypeScript code blocks
docs/pages/transactions/sponsor-gas/client.mdx Removed twoslash from two TypeScript code blocks
docs/pages/transactions/solana/react-per-transaction.mdx Removed twoslash from TSX code block
docs/pages/transactions/solana/react-global.mdx Removed twoslash from TypeScript code block
docs/pages/transactions/solana/api-sign.mdx Removed twoslash from three TypeScript code blocks
docs/pages/transactions/solana/api-request.mdx Removed twoslash from three TypeScript code blocks
docs/pages/transactions/solana/api-prepare.mdx Removed twoslash from two TypeScript code blocks
docs/pages/transactions/send-transactions/react.mdx Removed twoslash from TSX code block with focus attribute
docs/pages/transactions/send-transactions/prepare-calls/react.mdx Removed twoslash from TSX code block with focus attribute
docs/pages/transactions/send-transactions/prepare-calls/client.mdx Removed twoslash from two TypeScript code blocks
docs/pages/transactions/send-transactions/encoding-function-data/react.mdx Removed twoslash from TSX and TypeScript code blocks
docs/pages/transactions/send-transactions/encoding-function-data/client.mdx Removed twoslash from three TypeScript code blocks
docs/pages/transactions/send-transactions/client.mdx Removed twoslash from two TypeScript code blocks
docs/pages/transactions/send-parallel-transactions/react.mdx Removed twoslash from TSX and TypeScript code blocks
docs/pages/transactions/send-parallel-transactions/client.mdx Removed twoslash from two TypeScript code blocks
docs/pages/transactions/send-batch-transactions/react.mdx Removed twoslash from TSX and TypeScript code blocks
docs/pages/transactions/send-batch-transactions/client.mdx Removed twoslash from three TypeScript code blocks
docs/pages/transactions/retry-transactions/react.mdx Removed twoslash from TSX and TypeScript code blocks
docs/pages/transactions/retry-transactions/client.mdx Removed twoslash from two TypeScript code blocks
docs/pages/transactions/pay-gas-with-any-token/react.mdx Removed twoslash from TSX and TypeScript code blocks
docs/pages/transactions/pay-gas-with-any-token/client.mdx Removed twoslash from two TypeScript code blocks
docs/pages/third-party/smart-contracts.mdx Removed twoslash from two TypeScript code blocks
docs/pages/smart-contracts/other-accounts/modular-account/upgrading-to-modular-account.mdx Removed twoslash from four TypeScript code blocks
docs/pages/smart-contracts/other-accounts/modular-account/session-keys/getting-started.mdx Removed twoslash from seven TypeScript code blocks
docs/pages/smart-contracts/other-accounts/modular-account/multisig-plugin/getting-started.mdx Removed twoslash from four TypeScript code blocks
docs/pages/smart-contracts/other-accounts/modular-account/manage-plugins/install-plugins.mdx Removed twoslash from two TypeScript code blocks
docs/pages/smart-contracts/other-accounts/modular-account/manage-plugins/get-installed-plugins.mdx Removed twoslash from TypeScript code block
docs/pages/smart-contracts/other-accounts/modular-account/manage-ownership-mav1.mdx Removed twoslash from three TypeScript code blocks
docs/pages/smart-contracts/other-accounts/light-account/transfer-ownership-light-account.mdx Removed twoslash from two TypeScript code blocks
docs/pages/smart-contracts/other-accounts/light-account/multi-owner-light-account.mdx Removed twoslash from two TypeScript code blocks
docs/pages/smart-contracts/modular-account-v2/using-7702.mdx Removed twoslash from two TypeScript code blocks
docs/pages/signer/user-sessions.mdx Removed twoslash from TypeScript code block
docs/pages/signer/solana-wallets/solana-signer-package.mdx Removed twoslash from two TypeScript code blocks
docs/pages/signer/quickstart.mdx Removed twoslash from two TypeScript code blocks
docs/pages/signer/export-private-key.mdx Removed twoslash from TSX code block
docs/pages/signer/authentication/social-login.mdx Removed twoslash from TypeScript code block
docs/pages/signer/authentication/passkey-signup.mdx Removed twoslash from TypeScript code block
docs/pages/signer/authentication/passkey-login.mdx Removed twoslash from two TypeScript code blocks
docs/pages/signer/authentication/email-otp.mdx Removed twoslash from two TypeScript code blocks
docs/pages/signer/authentication/email-magic-link.mdx Removed twoslash from two TypeScript code blocks
docs/pages/signer/authentication/auth0.mdx Removed twoslash from TypeScript code block
docs/pages/signer/authentication/add-passkey.mdx Removed twoslash from TypeScript code block
docs/pages/signer/as-an-eoa.mdx Removed twoslash from TypeScript code block
docs/pages/recipes/multi-chain-setup.mdx Removed twoslash from two TypeScript code blocks
docs/pages/react/mfa/setup-mfa.mdx Removed twoslash from nine TypeScript code blocks
docs/pages/low-level-infra/quickstart.mdx Removed twoslash from TypeScript code block
docs/pages/low-level-infra/bundler/sdk.mdx Removed twoslash from three TypeScript code blocks
docs/pages/infra/quickstart.mdx Removed twoslash from TypeScript code block
docs/pages/core/quickstart.mdx Removed twoslash from two TypeScript code blocks
docs/pages/authentication/login-methods/email-otp.mdx Removed twoslash from two TSX code blocks with filenames

);
};
```

Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash to TypeScript code snippets. This code block is missing the twoslash directive that should be included for proper TypeScript validation and type checking.

Copilot generated this review using guidance from repository custom instructions.


</Tab>
<Tab title="Other Javascript">

Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash to TypeScript code snippets. This code block is missing the twoslash directive that should be included for proper TypeScript validation and type checking.

Copilot generated this review using guidance from repository custom instructions.

Now that you've set up your config for SSR, you will have to manually hydrate the state on the client. This can be done by calling the `hydrate` method exported by Smart Wallets core.

<CodeBlocks>

Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash to TypeScript code snippets. This code block is missing the twoslash directive that should be included for proper TypeScript validation and type checking.

Copilot generated this review using guidance from repository custom instructions.

onMount();
}
```

Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash to TypeScript code snippets. This code block is missing the twoslash directive that should be included for proper TypeScript validation and type checking.

Copilot generated this review using guidance from repository custom instructions.

Now you can get the initial state from cookies and pass it to the `hydrate` method to hydrate the account state on the client or on the server.

<CodeBlocks>

Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash to TypeScript code snippets. This code block is missing the twoslash directive that should be included for proper TypeScript validation and type checking.

Copilot generated this review using guidance from repository custom instructions.

onMount();
}
```

Copy link
Preview

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash to TypeScript code snippets. This code block is missing the twoslash directive that should be included for proper TypeScript validation and type checking.

Copilot generated this review using guidance from repository custom instructions.

<CodeBlocks>

```tsx sign-in-with-otp.tsx twoslash filename="sign-in-with-otp.tsx"
```tsx sign-in-with-otp.tsx filename="sign-in-with-otp.tsx"
Copy link
Contributor

@jakehobbs jakehobbs Sep 16, 2025

Choose a reason for hiding this comment

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

are we certain that this positional title works and we don't need to use the title prop when it's within a CodeBlocks? i.e.

Suggested change
```tsx sign-in-with-otp.tsx filename="sign-in-with-otp.tsx"
```tsx title=sign-in-with-otp.tsx filename="sign-in-with-otp.tsx"

i think that's prob testable locally

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems to render correctly for me locally:

Screenshot 2025-09-16 at 3 48 27 PM

@adamegyed adamegyed force-pushed the adam/remove-twoslash-for-fern-breaking branch from caad575 to b69a159 Compare September 16, 2025 19:49
@github-actions github-actions bot temporarily deployed to docs-preview September 16, 2025 19:50 Inactive
@adamegyed adamegyed enabled auto-merge (squash) September 16, 2025 19:51
@adamegyed adamegyed merged commit fd3b7a6 into main Sep 16, 2025
12 of 13 checks passed
@adamegyed adamegyed deleted the adam/remove-twoslash-for-fern-breaking branch September 16, 2025 19:55
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