Skip to content

fix(clerk-js): Do not display organization list after creating organization throw tasks flow#6117

Merged
LauraBeatris merged 10 commits intomainfrom
laura/orgs-683-when-creating-a-first-organization-on-after-auth-clerkreact
Jun 20, 2025
Merged

fix(clerk-js): Do not display organization list after creating organization throw tasks flow#6117
LauraBeatris merged 10 commits intomainfrom
laura/orgs-683-when-creating-a-first-organization-on-after-auth-clerkreact

Conversation

@LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented Jun 13, 2025

Resolves ORGS-683, ORGS-705

Issue

Currently, when creating an organization during the force-an-org step, it re-renders OrganizationList to display the list of memberships. This display is shown for a couple of seconds until the navigation to redirectUrlComplete is complete.

Solution

This PR introduces a separate chunk of UI for the force-an-org step, in which gets rendered only if it's inside a SessionTasks flow. With that, it can run a different logic to not display the list of memberships after creation, but only if there are no organization memberships attached to the session.

CleanShot.2025-06-18.at.11.36.50.mp4

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • New Features

    • Introduced a new flow for organization selection, allowing users to select or create an organization with improved loading states and error handling.
    • Added a dedicated component to manage the forced organization selection process.
  • Bug Fixes

    • Prevented the organization list from displaying immediately after creating an organization during forced organization selection.
  • Improvements

    • Enhanced navigation and state management during session tasks, providing clearer feedback and preventing redundant redirects.
    • Updated UI components for more flexible organization creation and selection flows.
    • Improved session navigation hooks to better synchronize client and server authentication states.
  • Chores

    • Increased JavaScript bundle size limits to accommodate recent updates.

@LauraBeatris LauraBeatris self-assigned this Jun 13, 2025
@changeset-bot
Copy link

changeset-bot bot commented Jun 13, 2025

🦋 Changeset detected

Latest commit: e01d4f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jun 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 5:07pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 13, 2025

📝 Walkthrough

"""

Walkthrough

This change refactors the organization selection and creation flow within the @clerk/clerk-js package, particularly targeting the force organization selection scenario. It introduces a new ForceOrganizationSelectionTask component to control the UI flow, ensuring the organization list is not briefly shown after creating an organization. The flow now conditionally renders either the organization list or the creation form based on user state. Context and navigation logic are updated, and defensive checks are added to prevent exceptions during session tasks. Bundle size limits are also slightly increased in the configuration.

Assessment against linked issues

Objective Addressed Explanation
Prevent exception after creating a first organization on after-auth (ORGS-683)
Ensure SDK navigates to afterCreateOrganizationUrl after org creation (ORGS-683)
Prevent organization list from displaying after org creation in force-org-selection flow (ORGS-705)
Remove brief display of organization list after org creation in force-org-selection (ORGS-705)

Suggested reviewers

  • NicolasLopes7
    """

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb33aef and e01d4f5.

📒 Files selected for processing (3)
  • packages/clerk-js/bundlewatch.config.json (2 hunks)
  • packages/clerk-js/src/core/clerk.ts (2 hunks)
  • packages/testing/src/playwright/unstable/page-objects/sessionTask.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/testing/src/playwright/unstable/page-objects/sessionTask.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/clerk-js/bundlewatch.config.json
  • packages/clerk-js/src/core/clerk.ts
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Build Packages
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@LauraBeatris LauraBeatris changed the title fix(clerk-s): Do not display organization list after creating organization throw tasks flow fix(clerk-js): Do not display organization list after creating organization throw tasks flow Jun 13, 2025
@LauraBeatris LauraBeatris changed the title fix(clerk-js): Do not display organization list after creating organization throw tasks flow [wip] fix(clerk-js): Do not display organization list after creating organization throw tasks flow Jun 13, 2025
@LauraBeatris LauraBeatris force-pushed the laura/orgs-683-when-creating-a-first-organization-on-after-auth-clerkreact branch 2 times, most recently from 42c4bce to 7904177 Compare June 13, 2025 19:17
@LauraBeatris LauraBeatris force-pushed the laura/orgs-683-when-creating-a-first-organization-on-after-auth-clerkreact branch from 7904177 to f1f5250 Compare June 13, 2025 19:23
@LauraBeatris LauraBeatris force-pushed the laura/orgs-683-when-creating-a-first-organization-on-after-auth-clerkreact branch from f1f5250 to c96f964 Compare June 13, 2025 19:24
@LauraBeatris LauraBeatris changed the title [wip] fix(clerk-js): Do not display organization list after creating organization throw tasks flow fix(clerk-js): Do not display organization list after creating organization throw tasks flow Jun 13, 2025
@LauraBeatris LauraBeatris force-pushed the laura/orgs-683-when-creating-a-first-organization-on-after-auth-clerkreact branch from ff68c71 to 69324a6 Compare June 13, 2025 19:32
@LauraBeatris LauraBeatris changed the title fix(clerk-js): Do not display organization list after creating organization throw tasks flow fix(clerk-js): Do not display organization list after creating organization throw tasks flow Jun 13, 2025
@LauraBeatris LauraBeatris marked this pull request as ready for review June 13, 2025 19:36
@LauraBeatris LauraBeatris requested review from a team, aeliox and wobsoriano as code owners June 13, 2025 19:36
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/clerk-js/src/ui/components/OrganizationList/OrganizationListPage.tsx (1)

273-289: Add accessible status to the loading spinner

Screen-reader users receive no feedback during the blocking loading state.
Wrap the spinner in a role="status" container or pass aria-label:

-    <Spinner
-      size={'lg'}
-      colorScheme={'primary'}
-      elementDescriptor={descriptors.spinner}
-    />
+    <Spinner
+      size={'lg'}
+      colorScheme={'primary'}
+      elementDescriptor={descriptors.spinner}
+      role='status'
+      aria-label='Loading'
+    />

This is a lightweight fix with zero visual impact.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69f8cff and 69324a6.

📒 Files selected for processing (2)
  • .changeset/common-mice-ring.md (1 hunks)
  • packages/clerk-js/src/ui/components/OrganizationList/OrganizationListPage.tsx (3 hunks)
🔇 Additional comments (1)
.changeset/common-mice-ring.md (1)

5-5: Changelog entry looks good

No issues; entry is concise and clear.

@LauraBeatris LauraBeatris force-pushed the laura/orgs-683-when-creating-a-first-organization-on-after-auth-clerkreact branch from 69324a6 to d6269e6 Compare June 13, 2025 19:41
@LauraBeatris LauraBeatris force-pushed the laura/orgs-683-when-creating-a-first-organization-on-after-auth-clerkreact branch from 6a0b8fc to 75945a6 Compare June 17, 2025 14:28
const tracker = createBeforeUnloadTracker(this.#options.standardBrowser);
const defaultRedirectUrlComplete = this.client?.signUp ? this.buildAfterSignUpUrl() : this.buildAfterSignInUrl();

this.#setTransitiveState();
Copy link
Member Author

Choose a reason for hiding this comment

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

We do not need the transitive state here. It was causing the SignIn component to unmount due to withCoreSessionGuard that does not render its children when session === undefined

It makes sense when we're going from an empty session to an actual session, but since in this case we already have one, then I don't see the reason why to set a transitive state here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Here you can see SignIn getting unmounted due to this.#setTransitiveState();:

CleanShot.2025-06-18.at.11.44.35.mp4

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationForm.tsx (1)

110-111: Drop the non-null assertion on lastCreatedOrganizationRef

lastCreatedOrganizationRef.current! is still asserted non-null even though the call is now optional.
Safer variant:

-void props.navigateAfterCreateOrganization?.(lastCreatedOrganizationRef.current!);
+const org = lastCreatedOrganizationRef.current;
+if (org) {
+  void props.navigateAfterCreateOrganization?.(org);
+}
packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (2)

1-3: Use the canonical import path for @clerk/shared/react

Mixing @clerk/shared/react and @clerk/shared/react/index creates distinct module ids in bundlers and can bloat the bundle.

-import { useOrganizationList } from '@clerk/shared/react/index';
+import { useOrganizationList } from '@clerk/shared/react';

124-125: Ensure isLoading is always boolean

undefined || false yields false, but undefined || undefined yields undefined.
Cast explicitly to boolean to avoid tri-state surprises:

-const isLoading = userMemberships?.isLoading || userInvitations?.isLoading || userSuggestions?.isLoading;
+const isLoading = Boolean(
+  userMemberships?.isLoading || userInvitations?.isLoading || userSuggestions?.isLoading,
+);
packages/clerk-js/src/ui/components/SessionTasks/index.tsx (1)

16-18: Remove unused navigate variable

navigate is retrieved but never used inside SessionTasksStart, which will trigger lint warnings.

-  const { navigate } = useRouter();
+  // no need to pull `navigate` from the router here
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f92be45 and 3c35a46.

📒 Files selected for processing (6)
  • .changeset/common-mice-ring.md (1 hunks)
  • packages/clerk-js/src/core/clerk.ts (0 hunks)
  • packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationForm.tsx (5 hunks)
  • packages/clerk-js/src/ui/components/OrganizationList/OrganizationListPage.tsx (2 hunks)
  • packages/clerk-js/src/ui/components/SessionTasks/index.tsx (3 hunks)
  • packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/clerk-js/src/core/clerk.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • .changeset/common-mice-ring.md
  • packages/clerk-js/src/ui/components/OrganizationList/OrganizationListPage.tsx
⏰ Context from checks skipped due to timeout of 90000ms (24)
  • GitHub Check: Integration Tests (nextjs, chrome, 13)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (expo-web, chrome)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (tanstack-react-router, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Integration Tests (elements, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (quickstart, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Unit Tests (22, **)
  • GitHub Check: Static analysis
  • GitHub Check: Unit Tests (18, --filter=@clerk/astro --filter=@clerk/backend --filter=@clerk/express --filter=@c...
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationForm.tsx (1)

92-96: Early-return skips invitation wizard by design — double-check downstream expectations

Calling sessionTasksContext.nextTask() and returning bypasses the invitation screen and completeFlow() logic.
Make sure every caller that provides SessionTasksContext truly wants to skip invitations; otherwise the flow will silently change behaviour.

Comment on lines +103 to +108
sx={t => ({
height: '100%',
minHeight: t.sizes.$60,
})}
Copy link
Member Author

Choose a reason for hiding this comment

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

We need to set a min-height on the loading state while the create organization form isn't rendered.

Ideally, the loading container should have a similar height as the create organization form / organization list, however it's not possible to know ahead of time since we need to wait for the useOrganizationList query to finish.


return (
<Card.Root>
<Card.Content sx={t => ({ padding: `${t.space.$8} ${t.space.$none} ${t.space.$none}` })}>
Copy link
Member Author

Choose a reason for hiding this comment

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

We're resetting the padding on the boundaries in order to have the divider:

image

Otherwise it'd stay like that:

image

void userMemberships.revalidate?.();

if (sessionTasksContext) {
await sessionTasksContext.nextTask();
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a pretty similar order as we'd have for custom flows:

  1. Create an organization
  2. Update it to the active session
  3. Verify if there are remaining tasks, and if so, navigate to the next one.

I've moved it inside of here now instead of passing it within onComplete prop so that we can await for it. onComplete is a sync property and I don't think we should turn into a promise in order to avoid side effects.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/clerk-js/src/ui/components/SessionTasks/index.tsx (1)

16-27: Remove the unused navigate reference to avoid dead code & misleading dependencies

navigate is destructured from useRouter() but never used inside the component.
Keeping it solely to satisfy the dependency array is brittle and may hide real omissions later.

-  const { navigate } = useRouter();
+  // No navigation needed here – we rely on Clerk’s internal helper.
+  const router = useRouter(); // keep a ref if you plan to log or debug, otherwise delete the line entirely

Also trim the dependency list accordingly:

-  }, [navigate, clerk, redirectUrlComplete]);
+  }, [clerk, redirectUrlComplete]);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3355727 and c40e3c2.

📒 Files selected for processing (3)
  • packages/clerk-js/bundlewatch.config.json (1 hunks)
  • packages/clerk-js/src/ui/components/SessionTasks/index.tsx (3 hunks)
  • packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/clerk-js/bundlewatch.config.json
  • packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Build Packages
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)

{ "path": "./dist/clerk.js", "maxSize": "610kB" },
{ "path": "./dist/clerk.browser.js", "maxSize": "70.16KB" },
{ "path": "./dist/clerk.legacy.browser.js", "maxSize": "113KB" },
{ "path": "./dist/clerk.js", "maxSize": "612kB" },
Copy link
Member Author

Choose a reason for hiding this comment

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

CleanShot 2025-06-18 at 13 21 54

The bundle increased around 4KB since I extracted the force-an-org flow outside of OrganizationList. It increased the general bundle, but we are lazy loading SessionTasks within SignIn.

I think the tradeoff is worth considering. I didn't want to introduce another if (sessionTasksContext) within OrganizationList to hijack the logic in there, but rather keep it separate.

Ideally, would be nice to use Suspense to only download the necessary after-auth steps according to Enviroment settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (1)

105-120: Loading state addresses previous feedback appropriately.

The component includes the requested minHeight styling to prevent layout shifts during loading, addressing the concern raised in previous reviews.

🧹 Nitpick comments (1)
packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (1)

73-89: Component serves its purpose but consider consolidation.

The CreateOrganizationPage component is simple and functional. However, given the complexity of conditional rendering across components, consider if this could be consolidated with similar logic in OrganizationSelectionPage.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 07f2e03 and 8c18c9e.

📒 Files selected for processing (1)
  • packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (3)

1-12: Imports look appropriate for the component's functionality.

All necessary dependencies are properly imported with clear separation between external libraries, internal contexts, and UI components.


17-35: Component logic is sound with proper loading and conditional rendering.

The main task component correctly handles loading states and conditionally renders based on organization data availability. The use of withCardStateProvider HOC ensures proper error handling context.


91-103: FlowCard component is well-structured with proper error handling.

The component correctly uses card state context for error display and provides consistent styling across the flow.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8c18c9e and 0b3144e.

📒 Files selected for processing (1)
  • packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (3)

37-67: LGTM - Clean conditional rendering implementation.

The conditional rendering logic is well-structured and addresses the previous concerns about unreachable code. The state management for toggling between list and create form is handled correctly.


87-99: LGTM - Proper card wrapper with error handling.

The FlowCard component correctly integrates with the card state provider and displays errors appropriately. The padding reset for the divider display aligns with the past review comments.


20-20: I’ll retry extracting the hook’s return shape with a properly labeled shell script:

#!/bin/bash
set -eux

file=packages/shared/src/react/hooks/useOrganizationList.tsx

echo "=== Hook signature and return block (around export function) ==="
sed -n '245,350p' "$file"

echo
echo "=== All occurrences of “count” in this file (with context) ==="
rg -n "count" -C3 "$file"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants