GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(auth): separate filesystem read and write permissions by juliusmarminge · Pull Request #9788 · pingdotgg/t3code

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 4, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Direct workspace reads and edits shared task permissions, while local diffs required review:write. Add filesystem:read for browsing, searching, previews, and local diffs, and filesystem:write for edits and saved plans. Both remain in the Standard preset; new grants retire review:write while old credentials remain decodable.

Host workspace/media URLs require file-read access when minted. Web, desktop, and mobile menus wait for a known grant from the source environment, then recheck after native selection and URL minting. Copying paths or URLs, uploaded attachments, and local or external media keep their existing behavior. Explicit asset refresh retains server authorization during grant loading.

Revocation hides cached search results and stops pending autosaves. Unsaved edits survive closing and reopening previews, React effect replay, and grant changes; an older editor's completed write cannot clear a newer draft's pending state. Typed project paths still work with task permission alone, while directory browsing requires file access. Mobile Review explains denied local-diff access instead of reporting an empty worktree.

Existing credentials keep their recorded scopes and need a fresh grant to add filesystem access. These scopes govern direct client actions; they do not sandbox providers or terminal commands.

Earlier focused media, search, save, and Review suites passed with coverage for initial grant loading, revocation during async work, draft recovery, and unaffected nonhost media. Web, mobile, and shared scoped typechecks passed during stack verification. The media below records those earlier client checks.

An existing race in the highlighting test fixture left frame callbacks running after its global stubs were removed, causing a cancelAnimationFrame exception in CI. The fixture now tracks and cancels pending frame handles after worker termination and before restoring globals. Controlled callback ordering reproduced the failure with the old fixture and passed with the fix; all seven tests using real workers passed at the integrated a685c585 revision. Web and mobile typechecks passed there. Lint for the integrated follow-up files reported zero errors and 24 existing warnings; formatting passed.

Earlier-revision pairing UI:

Before After
Before: pairing permissions After: filesystem permissions

Earlier iPhone E2E used the same dirty worktree with file access granted and denied. These captures predate final integration:

Before: missing permission reported as an empty worktree After: access denial explained
Before: mobile Review incorrectly says the worktree is empty After: mobile Review explains that the connection cannot read local diffs

Model: GPT 6 Astra. Harness: Codex.


Note

High Risk
Changes authentication scope requirements and authorization for file reads, writes, diffs, and asset URLs across server and all clients; misconfiguration or stale grants can block core workspace features.

Overview
Introduces filesystem:read and filesystem:write as first-class OAuth grant scopes and wires them through server RPC authorization, replacing orchestration/review scopes for direct host file operations and local diff preview. review:write is retired for new token requests; host workspace/media asset minting now requires filesystem:read, while attachments keep existing rules.

Web, mobile, and desktop clients gate browsing, file trees, previews, composer path search, asset URLs, media menus, and git/worktree review sections on resolveFilesystemReadAccess, showing loading/denial states instead of firing unauthorized queries or leaking cached host diffs. Losing filesystem:write stops autosave and keeps unsaved drafts across closed previews until write access returns; plan save and file editor UI reflect read-only mode.

Pairing/token flows and CLI scope flags now use the unified AuthGrantScope set; server tests cover scoped WS file read/write and asset URL behavior.

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

Note

Separate filesystem read and write scopes across server, web, and mobile

  • Adds shared resolveFilesystemReadAccess resolver in filesystem.ts that distinguishes pending, denied, and granted states from catalog, connection, and session data
  • Reassigns RPC methods in RpcAuthorization.ts from orchestration:read/review-write to filesystem:read/filesystem:write; assetsCreateUrl in ws.ts now requires filesystem:read for workspace-file and media-file resources
  • Gates host-file queries, asset URLs, path/content search, file previews, diff panels, command-palette browsing, and media actions on resolved read access across web and mobile; denied or pending access shows loading or error states instead of querying the host
  • Adds unsaved-draft retention in fileSaveCoordinator.ts and useFileSaveCoordinator.ts: writes are skipped when filesystem:write is revoked, drafts stay pending, and auto-recover once write access returns
  • Updates CLI scope flag in authScopes.ts and pairing settings in ConnectionsSettings.tsx to offer filesystem:read/filesystem:write instead of review-write
  • Risk: RPC_REQUIRED_SCOPES reassignment removes review-write; existing sessions or pairing tokens that relied on review-write for file/diff access must now be granted filesystem:read or filesystem:write

Macroscope summarized 7d9a81c.

Summary by CodeRabbit

  • New Features
    • Added separate file-read and file-write permissions for workspace access.
    • File browsing, searching, previews, diffs, media actions, and project-file loading now respect file-read access.
    • Workspace editing and saving require file-write access; unavailable files are shown as read-only or blocked.
    • Added clearer loading and access-error states across mobile and web experiences.
    • Preserved unsaved drafts when access changes or saving is temporarily unavailable.
    • Updated connection permission presets to include appropriate file-access permissions.
  • Documentation
    • Documented the new file-access permissions and their effects.
  • Bug Fixes
    • Prevented misleading empty review-diff messages when errors occur.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.8 KiB — 29.3 KiB ✅
Codex Live turn messages — 1 — 8 ✅
Claude Total thread wire — 5.0 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 21.2 KiB — 29.3 KiB ✅
Claude Live turn messages — 2 — 8 ✅

Baseline: unavailable · PR result: ca4ea2b · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot reviewed Sep 4, 2026
View reviewed changes
Comment thread apps/mobile/src/features/review/useReviewSections.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge changed the title t3code/auth filesystem scopes feat(auth): separate filesystem read and write permissions Sep 4, 2026
@juliusmarminge
juliusmarminge force-pushed the t3code/auth-filesystem-scopes branch from c80d93e to 3b96a67 Compare September 4, 2026 21:18
@juliusmarminge
juliusmarminge marked this pull request as ready for review September 4, 2026 21:20
macroscopeapp[bot]
macroscopeapp Bot reviewed Sep 4, 2026
View reviewed changes
Comment thread apps/web/src/assets/assetUrls.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/mobile/src/features/threads/new-task-flow-provider.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR changes the authentication model for filesystem reads and writes and propagates new authorization behavior across server, web, and mobile file, diff, search, media, and save paths. It also expands standard client default grants, making this a security-sensitive product-default change.

Not approved because:

  • Per-PR cost limit exceeded (workspace setting). Approvability relies on correctness review in order to determine eligibility

No code changes detected at ca4ea2b. Prior analysis still applies.

Review your spending limits in Billing settings, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge force-pushed the t3code/auth-filesystem-scopes branch from 3b96a67 to fb4489d Compare September 4, 2026 21:36
@juliusmarminge
juliusmarminge force-pushed the t3code/auth-filesystem-scopes branch from fb4489d to d7df773 Compare September 4, 2026 21:38
cursor[bot]
cursor Bot reviewed Sep 4, 2026
View reviewed changes
Comment thread apps/web/src/components/DiffPanel.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge force-pushed the t3code/auth-filesystem-scopes branch from bfb151c to eec5dfb Compare September 4, 2026 21:48
cursor[bot]
cursor Bot reviewed Sep 4, 2026
View reviewed changes
Comment thread apps/web/src/components/files/FilePreviewPanel.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Sep 4, 2026
cursor[bot]
cursor Bot reviewed Sep 4, 2026
View reviewed changes
Comment thread apps/web/src/components/files/FilePreviewPanel.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Sep 4, 2026
View reviewed changes

@cursor cursor Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/client-runtime/src/state/filesystem.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge force-pushed the t3code/auth-filesystem-scopes branch from 38e8814 to 4b73b2d Compare September 4, 2026 22:59
cursor[bot]
cursor Bot reviewed Sep 4, 2026
View reviewed changes

@cursor cursor Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/mobile/src/features/projects/AddProjectScreen.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/mobile/src/features/threads/new-task-flow-provider.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge force-pushed the t3code/auth-filesystem-scopes branch from 4b73b2d to bef54b1 Compare September 4, 2026 23:52
cursor[bot]
cursor Bot reviewed Sep 4, 2026
View reviewed changes

@cursor cursor Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/web/src/assets/assetUrls.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge force-pushed the t3code/auth-filesystem-scopes branch from bef54b1 to c1d166f Compare September 5, 2026 00:08
juliusmarminge and others added 26 commits October 6, 2026 20:09
@juliusmarminge
fix(files): distinguish pending access from unavailable connections
2d27bba
@juliusmarminge
fix(clients): wait for file grants before failing assets
9e67ba3
@juliusmarminge
test(web): isolate pending asset grants from preview controls
b3f01c2
@juliusmarminge
fix(mobile): preserve review selection while grants load
b70dded
@juliusmarminge
fix(mobile): report access failures for unavailable reviews
8c7df86
@juliusmarminge
fix(web): keep filesystem access checks pending
dfc9067
@juliusmarminge
fix(web): retain new-folder prompts after listing errors
bd91521
@juliusmarminge
fix(mobile): report denied local review access
48e31a5
@juliusmarminge
fix(web): gate content search on filesystem access
3394154
@juliusmarminge
fix(clients): gate host media actions by file permission
ddd71bb
@juliusmarminge
fix(clients): wait for media grants before enabling actions
3e43305
@juliusmarminge
test(web): use compatible media action receipts
fb52f71
@juliusmarminge
test(web): isolate asset hooks in preview view tests
615ab70
@juliusmarminge @claude
refactor(web): resolve file access through one hook
1a2d140
The same resolveFilesystemReadAccess block was inlined in four files.
Using the existing useFilesystemReadAccess hook drops the copies and
stops useAssetUrls and the read-only editor banner from treating a
pending grant as a denial.

Co-Authored-By: Claude Fable 5 <[email protected]>
@juliusmarminge @claude
fix(web): align filesystem gating with the current file UI
a0e76cd
The rebase left the fixture's frame tracker declared twice, a loading
state on a removed icon, and the media hook private while its test drives
it directly.

Co-Authored-By: Claude Fable 5 <[email protected]>
@juliusmarminge
fix(auth): keep legacy review scope internal
32d77d2
@juliusmarminge
test(web): include content search result indices
bcc0788
@juliusmarminge
test(web): provide server configs in markdown asset fixtures
1738141
@juliusmarminge
style(auth): format rebased asset access check
ec90742
@juliusmarminge
style(auth): format rebased file access guards
5bec8a3
@juliusmarminge
fix(auth): retain filesystem access boundaries on v2
bb553b3
@juliusmarminge
chore(auth): align filesystem changes with current lint rules
112a857
@juliusmarminge
refactor(mobile): keep media permission state out of lib
9f16d95
@juliusmarminge
fix(auth): follow current Effect module and layer names
c19c997
@juliusmarminge
test(auth): update file asset fixtures for current contracts
b850f19
@juliusmarminge
test(mobile): include asset expiry in permission assertions
ca4ea2b
@saphid saphid mentioned this pull request Oct 6, 2026
refactor(web): open the Files side panel through the panel host #16043
Closed
@kalvenschraut kalvenschraut mentioned this pull request Oct 7, 2026
chore(sync): merge upstream main for RTVision 0.0.73 RTVision/t3code#82
Merged
@varo6 varo6 mentioned this pull request Oct 7, 2026
[Bug]: Existing connections cannot view agent screenshots after new filesystem scopes, without actionable recovery guidance #16916
Closed
2 tasks done
@juliusmarminge juliusmarminge mentioned this pull request Oct 10, 2026
[Bug]: Host-path images show "Image unavailable" ("moved or deleted") when the session lacks filesystem:read, e.g. after redeeming a pre-upgrade pairing link #17906
Closed
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.