Skip to content

Document save_changes requirement for per-user pool profiles - #497

Merged
AnnaXWang merged 2 commits into
mainfrom
hypeship/fix-pool-profile-persistence-docs
Aug 10, 2026
Merged

Document save_changes requirement for per-user pool profiles#497
AnnaXWang merged 2 commits into
mainfrom
hypeship/fix-pool-profile-persistence-docs

Conversation

@AnnaXWang

@AnnaXWang AnnaXWang commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The per-user browser pool flow on /browsers/pools tells you to attach a profile after acquiring and release with reuse: false, then claims "Destroying it both persists that user's profile changes." It doesn't — save_changes defaults to false on the profile attach, and the destroy-time save is gated on it, so anyone following the page verbatim silently discards every user's session on release.

Changes

  • Per-user profiles section: state that the attach must carry save_changes: true, and explain why the read-only rule doesn't apply here (the profile belongs to the browser, not the pool). Added a TypeScript/Python/Go example of the full acquire → attach → release cycle, which the section previously lacked.
  • Limitations bullet: scoped "profiles load read-only" to the pool's own profile, since a profile attached post-acquire is writable. Repointed its link from #profiles-with-browser-pools to #per-user-profiles-with-browser-pools — the bullet promises "how to persist state per user" but was linking to the section that says persistence isn't possible.
  • /auth/profiles notes: same save_changes: true omission in the bullet that cross-links to the pools page.

Verification

Checked against the API source rather than inferred:

  • BrowserProfile.save_changes defaults to false; BrowserPoolProfile omits it entirely and ignores it if sent.
  • PATCH /browsers/{id} accepts a profile on a leased pooled session (rejected only when not leased) and carries save_changes through to the session row.
  • Release with reuse: false destroys the session, and the destroy path only saves the profile when Profile.SaveChanges is set.

No change to the refresh_on_profile_update section — its documented behavior (requires a pool profile, defaults to true when a profile is attached, forced false when the profile is cleared) matches the validation and PATCH resolution logic.

Not rendered locally; the copy and code examples follow the existing conventions on both pages.


Note

Low Risk
Documentation-only changes with no runtime, API, or security impact.

Overview
Fixes documentation that implied per-user profile state is persisted when releasing a pooled browser with reuse: false, without mentioning that save_changes defaults to false on post-acquire profile attach.

On /browsers/pools, the per-user flow now states that pool-config profiles stay read-only while profiles attached after acquire follow normal browser rules, so attach must use save_changes: true or session data is discarded on destroy. Adds a TypeScript/Python/Go acquire → browsers.update → release example. The limitations bullet scopes read-only behavior to the pool’s profile and links to #per-user-profiles-with-browser-pools. Removes the incorrect claim that destroy alone persists changes.

On /auth/profiles, the cross-link note now explicitly requires save_changes: true when persisting per-user state through a pool.

Reviewed by Cursor Bugbot for commit 948e372. Bugbot is set up for automated code reviews on this repo. Configure here.

The per-user browser pool flow said destroying the browser persists the
user's profile changes, but save_changes defaults to false, so following
the docs verbatim discards every user's session on release. Spell out the
opt-in and add a TS/Python/Go example of the full acquire-attach-release
cycle.

Also scope the "profiles load read-only" limitation to the pool's own
profile — a profile attached after acquiring is writable — and point that
bullet at the per-user section rather than its parent, which describes the
read-only case it is contrasting against.
@mintlify

mintlify Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Kernel 🟢 Ready View Preview Aug 10, 2026, 5:43 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Error Error Aug 10, 2026 5:59pm

@AnnaXWang
AnnaXWang marked this pull request as ready for review August 10, 2026 17:59
cursor[bot]
cursor Bot approved these changes Aug 10, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk assessment: Very Low

Verdict: Very Low risk — approved.

Evidence (from diff vs main)

  • 2 files changed, +64 / −3: browsers/pools.mdx, auth/profiles.mdx
  • Documentation-only MDX edits: clarifies that per-user pool profile attach requires save_changes: true, scopes the read-only limitation to the pool’s own profile, fixes an anchor link, and adds TS/Python/Go acquire → attach → release examples
  • No application code, config, infra, auth/billing logic, schemas, or shared libraries modified

Risk factors

Factor Assessment
Codepaths / blast radius Docs site content only
Complexity Small, localized copy + examples
Infra / ops / security None
User-facing surface Published docs only (correctness of API guidance; no runtime behavior change)

Checks

  • No CODEOWNERS file in repo — codeowner review not required for approval
  • No prior approvals to re-evaluate or dismiss
  • No reviewers assigned by this automation

Action: Approve (Very Low).

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@Sayan- Sayan- left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

updated guidance lgtm

@AnnaXWang
AnnaXWang merged commit 5b1545f into main Aug 10, 2026
6 of 7 checks passed
@AnnaXWang
AnnaXWang deleted the hypeship/fix-pool-profile-persistence-docs branch August 10, 2026 21:28
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