Skip to content

fix(auth): use SameSite=Lax for pi_web_session cookie - #818

Merged
agegr merged 1 commit into
agegr:mainfrom
richardmilles:fix/806-cookie-samesite-lax
Sep 15, 2026
Merged

agegr merged 1 commit into
agegr:mainfrom
richardmilles:fix/806-cookie-samesite-lax

Conversation

@richardmilles

Copy link
Copy Markdown
Contributor

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes #806

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806
@agegr
agegr merged commit c1e544b into agegr:main Sep 15, 2026
2 checks passed
agegr added a commit that referenced this pull request Sep 18, 2026
* Show the reasoning level of the running turn

The reasoning control is hidden while a turn streams because the level
cannot be changed mid-turn. That also hides the level itself, exactly when
it decides how long the turn runs and how much budget it spends.

Render the active level as a read-only label in the same slot while
streaming. It is not a button: nothing can change until the turn ends, so
a clickable control would only invite clicks that do nothing. The label
reuses the existing display label, icon, padding, height, and mobile
collapse rule, so the control row keeps its spacing next to Stop.

* Address review: show the level the turn actually runs with

Choosing "Use pi default" sets the selector to "auto" without touching the
runtime, so the runtime can keep an earlier explicit level. Rendering the
selector state while streaming would then label a turn "auto" that is in
fact running at, say, "high".

When a turn starts, read the runtime's thinking level from the agent state
and adopt it, so the read-only label and the selector both reflect the
level in effect. The lookup is skipped if the turn has already ended.

* Align new session branding with chat input

* fix: preserve UNC roots in file API paths

* fix(auth): use SameSite=Lax for pi_web_session cookie (#818)

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes #806

* fix: preserve newlines in extension dialog titles like pi's TUI

* fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer

Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in
[email protected]) and pulls sharp 0.35.4 for the libheif advisories via
npm audit fix. next/image is only used for the static logo, so the
/_next/image endpoint is turned off entirely with images.unoptimized.

Co-authored-by: Cursor <[email protected]>

* fix: keep focused extension select option clear of the scroller edge

scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush
against the scroll container, where whole-pixel scroll snapping left it a
fraction of a pixel outside the viewport and overflow clipping cut off its
focus ring. Give options a scroll-margin equal to the container padding so
navigation always lands them fully visible; this also unblocks the e2e
"Keyboard selection must scroll into view" assertion.

Co-authored-by: Cursor <[email protected]>

* fix(auth): throttle web password failures with global backoff

Route handlers have no reliable client address, so a per-IP limiter would
be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access.
Use one shared exponential backoff (1s doubling to 60s) for POST
/api/web-auth instead; a success or five idle minutes resets it. Return
429 with Retry-After while blocked and surface the wait on the login page.

Co-authored-by: Cursor <[email protected]>

* Guard the turn-start thinking-level fetch against session/run races

Co-authored-by: Cursor <[email protected]>

* Align thinking-level display with model selection

Show the resolved runtime level instead of the auto placeholder, and keep
the same disabled control while a turn runs. Auto stays an uncommitted
default, matching isAutoModelSelection.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: wayne.luo <[email protected]>
Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: richardmilles <[email protected]>
Co-authored-by: Cursor <[email protected]>
agegr added a commit that referenced this pull request Sep 19, 2026
* fix: count only visible messages toward the session tail budget

The tail window was counted in raw entries, so toolResult and other
non-rendering entries consumed the budget. In agent-heavy sessions the
window starved user messages out of the chat: a real session with 15
user messages across 562 entries loaded exactly ONE user message; every
earlier question needed manual "load earlier" paging.

- countsTowardTail(): user / assistant messages plus the compaction
  divider consume the budget; toolResult and hidden custom entries ride
  along inside the span
- regression test for the pagination path

* Align new session branding with chat input

* fix: preserve UNC roots in file API paths

* fix(auth): use SameSite=Lax for pi_web_session cookie (#818)

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes #806

* fix: preserve newlines in extension dialog titles like pi's TUI

* fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer

Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in
[email protected]) and pulls sharp 0.35.4 for the libheif advisories via
npm audit fix. next/image is only used for the static logo, so the
/_next/image endpoint is turned off entirely with images.unoptimized.

Co-authored-by: Cursor <[email protected]>

* fix: keep focused extension select option clear of the scroller edge

scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush
against the scroll container, where whole-pixel scroll snapping left it a
fraction of a pixel outside the viewport and overflow clipping cut off its
focus ring. Give options a scroll-margin equal to the container padding so
navigation always lands them fully visible; this also unblocks the e2e
"Keyboard selection must scroll into view" assertion.

Co-authored-by: Cursor <[email protected]>

* fix(auth): throttle web password failures with global backoff

Route handlers have no reliable client address, so a per-IP limiter would
be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access.
Use one shared exponential backoff (1s doubling to 60s) for POST
/api/web-auth instead; a success or five idle minutes resets it. Return
429 with Retry-After while blocked and surface the wait on the login page.

Co-authored-by: Cursor <[email protected]>

* Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: richardmilles <[email protected]>
Co-authored-by: Cursor <[email protected]>
lclichen pushed a commit to lclichen/pi-web that referenced this pull request Sep 22, 2026
…r#810)

* fix: count only visible messages toward the session tail budget

The tail window was counted in raw entries, so toolResult and other
non-rendering entries consumed the budget. In agent-heavy sessions the
window starved user messages out of the chat: a real session with 15
user messages across 562 entries loaded exactly ONE user message; every
earlier question needed manual "load earlier" paging.

- countsTowardTail(): user / assistant messages plus the compaction
  divider consume the budget; toolResult and hidden custom entries ride
  along inside the span
- regression test for the pagination path

* Align new session branding with chat input

* fix: preserve UNC roots in file API paths

* fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818)

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806

* fix: preserve newlines in extension dialog titles like pi's TUI

* fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer

Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in
[email protected]) and pulls sharp 0.35.4 for the libheif advisories via
npm audit fix. next/image is only used for the static logo, so the
/_next/image endpoint is turned off entirely with images.unoptimized.

Co-authored-by: Cursor <[email protected]>

* fix: keep focused extension select option clear of the scroller edge

scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush
against the scroll container, where whole-pixel scroll snapping left it a
fraction of a pixel outside the viewport and overflow clipping cut off its
focus ring. Give options a scroll-margin equal to the container padding so
navigation always lands them fully visible; this also unblocks the e2e
"Keyboard selection must scroll into view" assertion.

Co-authored-by: Cursor <[email protected]>

* fix(auth): throttle web password failures with global backoff

Route handlers have no reliable client address, so a per-IP limiter would
be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access.
Use one shared exponential backoff (1s doubling to 60s) for POST
/api/web-auth instead; a success or five idle minutes resets it. Return
429 with Retry-After while blocked and surface the wait on the login page.

Co-authored-by: Cursor <[email protected]>

* Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: richardmilles <[email protected]>
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 50a2fd4)
lclichen pushed a commit to lclichen/pi-web that referenced this pull request Sep 22, 2026
* Show the reasoning level of the running turn

The reasoning control is hidden while a turn streams because the level
cannot be changed mid-turn. That also hides the level itself, exactly when
it decides how long the turn runs and how much budget it spends.

Render the active level as a read-only label in the same slot while
streaming. It is not a button: nothing can change until the turn ends, so
a clickable control would only invite clicks that do nothing. The label
reuses the existing display label, icon, padding, height, and mobile
collapse rule, so the control row keeps its spacing next to Stop.

* Address review: show the level the turn actually runs with

Choosing "Use pi default" sets the selector to "auto" without touching the
runtime, so the runtime can keep an earlier explicit level. Rendering the
selector state while streaming would then label a turn "auto" that is in
fact running at, say, "high".

When a turn starts, read the runtime's thinking level from the agent state
and adopt it, so the read-only label and the selector both reflect the
level in effect. The lookup is skipped if the turn has already ended.

* Align new session branding with chat input

* fix: preserve UNC roots in file API paths

* fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818)

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806

* fix: preserve newlines in extension dialog titles like pi's TUI

* fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer

Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in
[email protected]) and pulls sharp 0.35.4 for the libheif advisories via
npm audit fix. next/image is only used for the static logo, so the
/_next/image endpoint is turned off entirely with images.unoptimized.

Co-authored-by: Cursor <[email protected]>

* fix: keep focused extension select option clear of the scroller edge

scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush
against the scroll container, where whole-pixel scroll snapping left it a
fraction of a pixel outside the viewport and overflow clipping cut off its
focus ring. Give options a scroll-margin equal to the container padding so
navigation always lands them fully visible; this also unblocks the e2e
"Keyboard selection must scroll into view" assertion.

Co-authored-by: Cursor <[email protected]>

* fix(auth): throttle web password failures with global backoff

Route handlers have no reliable client address, so a per-IP limiter would
be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access.
Use one shared exponential backoff (1s doubling to 60s) for POST
/api/web-auth instead; a success or five idle minutes resets it. Return
429 with Retry-After while blocked and surface the wait on the login page.

Co-authored-by: Cursor <[email protected]>

* Guard the turn-start thinking-level fetch against session/run races

Co-authored-by: Cursor <[email protected]>

* Align thinking-level display with model selection

Show the resolved runtime level instead of the auto placeholder, and keep
the same disabled control while a turn runs. Auto stays an uncommitted
default, matching isAutoModelSelection.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: wayne.luo <[email protected]>
Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: richardmilles <[email protected]>
Co-authored-by: Cursor <[email protected]>
(cherry picked from commit 3f07a5f)
HeRockOne pushed a commit to HeRockOne/pi-web that referenced this pull request Sep 30, 2026
…r#810)

* fix: count only visible messages toward the session tail budget

The tail window was counted in raw entries, so toolResult and other
non-rendering entries consumed the budget. In agent-heavy sessions the
window starved user messages out of the chat: a real session with 15
user messages across 562 entries loaded exactly ONE user message; every
earlier question needed manual "load earlier" paging.

- countsTowardTail(): user / assistant messages plus the compaction
  divider consume the budget; toolResult and hidden custom entries ride
  along inside the span
- regression test for the pagination path

* Align new session branding with chat input

* fix: preserve UNC roots in file API paths

* fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818)

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806

* fix: preserve newlines in extension dialog titles like pi's TUI

* fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer

Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in
[email protected]) and pulls sharp 0.35.4 for the libheif advisories via
npm audit fix. next/image is only used for the static logo, so the
/_next/image endpoint is turned off entirely with images.unoptimized.

Co-authored-by: Cursor <[email protected]>

* fix: keep focused extension select option clear of the scroller edge

scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush
against the scroll container, where whole-pixel scroll snapping left it a
fraction of a pixel outside the viewport and overflow clipping cut off its
focus ring. Give options a scroll-margin equal to the container padding so
navigation always lands them fully visible; this also unblocks the e2e
"Keyboard selection must scroll into view" assertion.

Co-authored-by: Cursor <[email protected]>

* fix(auth): throttle web password failures with global backoff

Route handlers have no reliable client address, so a per-IP limiter would
be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access.
Use one shared exponential backoff (1s doubling to 60s) for POST
/api/web-auth instead; a success or five idle minutes resets it. Return
429 with Retry-After while blocked and surface the wait on the login page.

Co-authored-by: Cursor <[email protected]>

* Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: richardmilles <[email protected]>
Co-authored-by: Cursor <[email protected]>
windli2018 pushed a commit to aiti-ai/aiti-ai that referenced this pull request Nov 6, 2026
SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806
windli2018 pushed a commit to aiti-ai/aiti-ai that referenced this pull request Nov 6, 2026
* Show the reasoning level of the running turn

The reasoning control is hidden while a turn streams because the level
cannot be changed mid-turn. That also hides the level itself, exactly when
it decides how long the turn runs and how much budget it spends.

Render the active level as a read-only label in the same slot while
streaming. It is not a button: nothing can change until the turn ends, so
a clickable control would only invite clicks that do nothing. The label
reuses the existing display label, icon, padding, height, and mobile
collapse rule, so the control row keeps its spacing next to Stop.

* Address review: show the level the turn actually runs with

Choosing "Use pi default" sets the selector to "auto" without touching the
runtime, so the runtime can keep an earlier explicit level. Rendering the
selector state while streaming would then label a turn "auto" that is in
fact running at, say, "high".

When a turn starts, read the runtime's thinking level from the agent state
and adopt it, so the read-only label and the selector both reflect the
level in effect. The lookup is skipped if the turn has already ended.

* Align new session branding with chat input

* fix: preserve UNC roots in file API paths

* fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818)

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806

* fix: preserve newlines in extension dialog titles like pi's TUI

* fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer

Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in
[email protected]) and pulls sharp 0.35.4 for the libheif advisories via
npm audit fix. next/image is only used for the static logo, so the
/_next/image endpoint is turned off entirely with images.unoptimized.

Co-authored-by: Cursor <[email protected]>

* fix: keep focused extension select option clear of the scroller edge

scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush
against the scroll container, where whole-pixel scroll snapping left it a
fraction of a pixel outside the viewport and overflow clipping cut off its
focus ring. Give options a scroll-margin equal to the container padding so
navigation always lands them fully visible; this also unblocks the e2e
"Keyboard selection must scroll into view" assertion.

Co-authored-by: Cursor <[email protected]>

* fix(auth): throttle web password failures with global backoff

Route handlers have no reliable client address, so a per-IP limiter would
be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access.
Use one shared exponential backoff (1s doubling to 60s) for POST
/api/web-auth instead; a success or five idle minutes resets it. Return
429 with Retry-After while blocked and surface the wait on the login page.

Co-authored-by: Cursor <[email protected]>

* Guard the turn-start thinking-level fetch against session/run races

Co-authored-by: Cursor <[email protected]>

* Align thinking-level display with model selection

Show the resolved runtime level instead of the auto placeholder, and keep
the same disabled control while a turn runs. Auto stays an uncommitted
default, matching isAutoModelSelection.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: wayne.luo <[email protected]>
Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: richardmilles <[email protected]>
Co-authored-by: Cursor <[email protected]>
windli2018 pushed a commit to aiti-ai/aiti-ai that referenced this pull request Nov 6, 2026
…r#810)

* fix: count only visible messages toward the session tail budget

The tail window was counted in raw entries, so toolResult and other
non-rendering entries consumed the budget. In agent-heavy sessions the
window starved user messages out of the chat: a real session with 15
user messages across 562 entries loaded exactly ONE user message; every
earlier question needed manual "load earlier" paging.

- countsTowardTail(): user / assistant messages plus the compaction
  divider consume the budget; toolResult and hidden custom entries ride
  along inside the span
- regression test for the pagination path

* Align new session branding with chat input

* fix: preserve UNC roots in file API paths

* fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818)

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806

* fix: preserve newlines in extension dialog titles like pi's TUI

* fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer

Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in
[email protected]) and pulls sharp 0.35.4 for the libheif advisories via
npm audit fix. next/image is only used for the static logo, so the
/_next/image endpoint is turned off entirely with images.unoptimized.

Co-authored-by: Cursor <[email protected]>

* fix: keep focused extension select option clear of the scroller edge

scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush
against the scroll container, where whole-pixel scroll snapping left it a
fraction of a pixel outside the viewport and overflow clipping cut off its
focus ring. Give options a scroll-margin equal to the container padding so
navigation always lands them fully visible; this also unblocks the e2e
"Keyboard selection must scroll into view" assertion.

Co-authored-by: Cursor <[email protected]>

* fix(auth): throttle web password failures with global backoff

Route handlers have no reliable client address, so a per-IP limiter would
be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access.
Use one shared exponential backoff (1s doubling to 60s) for POST
/api/web-auth instead; a success or five idle minutes resets it. Return
429 with Retry-After while blocked and surface the wait on the login page.

Co-authored-by: Cursor <[email protected]>

* Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: richardmilles <[email protected]>
Co-authored-by: Cursor <[email protected]>
windli2018 pushed a commit to aiti-ai/aiti-ai that referenced this pull request Nov 8, 2026
SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806
windli2018 pushed a commit to aiti-ai/aiti-ai that referenced this pull request Nov 8, 2026
* Show the reasoning level of the running turn

The reasoning control is hidden while a turn streams because the level
cannot be changed mid-turn. That also hides the level itself, exactly when
it decides how long the turn runs and how much budget it spends.

Render the active level as a read-only label in the same slot while
streaming. It is not a button: nothing can change until the turn ends, so
a clickable control would only invite clicks that do nothing. The label
reuses the existing display label, icon, padding, height, and mobile
collapse rule, so the control row keeps its spacing next to Stop.

* Address review: show the level the turn actually runs with

Choosing "Use pi default" sets the selector to "auto" without touching the
runtime, so the runtime can keep an earlier explicit level. Rendering the
selector state while streaming would then label a turn "auto" that is in
fact running at, say, "high".

When a turn starts, read the runtime's thinking level from the agent state
and adopt it, so the read-only label and the selector both reflect the
level in effect. The lookup is skipped if the turn has already ended.

* Align new session branding with chat input

* fix: preserve UNC roots in file API paths

* fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818)

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806

* fix: preserve newlines in extension dialog titles like pi's TUI

* fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer

Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in
[email protected]) and pulls sharp 0.35.4 for the libheif advisories via
npm audit fix. next/image is only used for the static logo, so the
/_next/image endpoint is turned off entirely with images.unoptimized.

Co-authored-by: Cursor <[email protected]>

* fix: keep focused extension select option clear of the scroller edge

scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush
against the scroll container, where whole-pixel scroll snapping left it a
fraction of a pixel outside the viewport and overflow clipping cut off its
focus ring. Give options a scroll-margin equal to the container padding so
navigation always lands them fully visible; this also unblocks the e2e
"Keyboard selection must scroll into view" assertion.

Co-authored-by: Cursor <[email protected]>

* fix(auth): throttle web password failures with global backoff

Route handlers have no reliable client address, so a per-IP limiter would
be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access.
Use one shared exponential backoff (1s doubling to 60s) for POST
/api/web-auth instead; a success or five idle minutes resets it. Return
429 with Retry-After while blocked and surface the wait on the login page.

Co-authored-by: Cursor <[email protected]>

* Guard the turn-start thinking-level fetch against session/run races

Co-authored-by: Cursor <[email protected]>

* Align thinking-level display with model selection

Show the resolved runtime level instead of the auto placeholder, and keep
the same disabled control while a turn runs. Auto stays an uncommitted
default, matching isAutoModelSelection.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: wayne.luo <[email protected]>
Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: richardmilles <[email protected]>
Co-authored-by: Cursor <[email protected]>
windli2018 pushed a commit to aiti-ai/aiti-ai that referenced this pull request Nov 8, 2026
…r#810)

* fix: count only visible messages toward the session tail budget

The tail window was counted in raw entries, so toolResult and other
non-rendering entries consumed the budget. In agent-heavy sessions the
window starved user messages out of the chat: a real session with 15
user messages across 562 entries loaded exactly ONE user message; every
earlier question needed manual "load earlier" paging.

- countsTowardTail(): user / assistant messages plus the compaction
  divider consume the budget; toolResult and hidden custom entries ride
  along inside the span
- regression test for the pagination path

* Align new session branding with chat input

* fix: preserve UNC roots in file API paths

* fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818)

SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.

Fixes agegr#806

* fix: preserve newlines in extension dialog titles like pi's TUI

* fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer

Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in
[email protected]) and pulls sharp 0.35.4 for the libheif advisories via
npm audit fix. next/image is only used for the static logo, so the
/_next/image endpoint is turned off entirely with images.unoptimized.

Co-authored-by: Cursor <[email protected]>

* fix: keep focused extension select option clear of the scroller edge

scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush
against the scroll container, where whole-pixel scroll snapping left it a
fraction of a pixel outside the viewport and overflow clipping cut off its
focus ring. Give options a scroll-margin equal to the container padding so
navigation always lands them fully visible; this also unblocks the e2e
"Keyboard selection must scroll into view" assertion.

Co-authored-by: Cursor <[email protected]>

* fix(auth): throttle web password failures with global backoff

Route handlers have no reliable client address, so a per-IP limiter would
be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access.
Use one shared exponential backoff (1s doubling to 60s) for POST
/api/web-auth instead; a success or five idle minutes resets it. Return
429 with Retry-After while blocked and surface the wait on the login page.

Co-authored-by: Cursor <[email protected]>

* Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Alex Yang <[email protected]>
Co-authored-by: richardmilles <[email protected]>
Co-authored-by: Cursor <[email protected]>
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.

pi_web_session cookie SameSite=strict forces re-login on external-entry navigation (mobile)

2 participants