-
Notifications
You must be signed in to change notification settings - Fork 19
Release 107 feedback: clean desktop chat previews #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alichherawalla
wants to merge
416
commits into
main
Choose a base branch
from
release/107-feedback
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 33 commits
Commits
Show all changes
416 commits
Select commit
Hold shift + click to select a range
308347e
feat(mcp): gate the action tools behind a per-device pairing token
siddWednesday 52c1b3b
feat(pairing): LAN-address + pairing-payload building blocks for QR p…
siddWednesday 17e2497
feat(pairing): desktop "Pair a device" panel with QR + copyable code
siddWednesday 2f3c511
refactor(pairing): drop the standalone "Pair a device" Settings panel
siddWednesday 9c4e7ca
build(deps): re-add qrcode.react for the Devices pairing QR
siddWednesday 0cdd0b5
feat(explore): the demo-preset catalog (SSOT for the showcase)
siddWednesday 31c035f
feat(explore): ExploreSection - capability-grouped preset cards
siddWednesday 70d870e
feat(explore): surface demo presets in the chat empty state
siddWednesday 183e6b6
feat(explore): add Explore landing view + seed-prompt handoff
siddWednesday 2bb50b1
fix(explore): use the brand name "Off Grid AI" in the Explore header
siddWednesday a961ce4
fix(rag): stop a hyphenated query from crashing the whole chat retrieval
siddWednesday 4cb26ee
fix(explore): make the Play-music preset concrete and drop the volume…
siddWednesday c064376
feat(approvals): show the inline chat card for computer-use gates in …
siddWednesday 964fd72
feat(approvals): core seam for the auto/ask computer-task approval mode
siddWednesday d9bf87c
feat(approvals): multi-subscriber inline gate surface (fan out to car…
siddWednesday a7eeefe
test(chat): render clean desktop previews
alichherawalla 9a1f4e2
feat(explore): capability panels + label titles, never the raw prompt
siddWednesday 59aab3c
test(e2e): explore surfaces render label-only cards on both placements
siddWednesday 5fed910
feat(explore): per-preset icons + runs count on each capability panel
siddWednesday 5e45465
fix(browser): stop the agent browser's audio when it's hidden or the …
siddWednesday 4463ae1
fix(chat): remove the grounder-model nudge from the chat
siddWednesday c65db99
fix(approvals): dismiss the gate card the instant the user decides
siddWednesday b96cdfe
fix(browser): make the watched-pane resize handle grabbable with a gr…
siddWednesday df28524
fix(browser): stream web-task steps in the chat, not below the browser
siddWednesday f750019
refine(explore): make preset prompts concrete and self-explanatory
siddWednesday 37cb1d8
Merge remote-tracking branch 'origin/main' into feat/chat-approvals
siddWednesday 14090a3
fix(merge): bump pro pointer + resolve pre-existing failures surfaced…
siddWednesday dc00ac0
feat(win/vision): DPI-aware coordinate mapping for the computer-use rail
siddWednesday 2f26fac
ci(win): fail loud if the computer-use input addon (nut.js) is absent
siddWednesday 08c92ff
docs(win): record action-rails + computer-use Windows status
siddWednesday d3e8504
ci(win): build @offgrid/models + let dispatch pin the shared ref
siddWednesday a18819c
feat(vision): fall back to the active model when the grounder isn't d…
siddWednesday b06280c
feat(speech): configure transcription language
alichherawalla 9e67b85
fix(ui): standardize dismissible side panels
alichherawalla cb36e36
fix(chat): open safe markdown links
alichherawalla fd952ef
feat(search): add Activity and Files commands
alichherawalla 4dcac8a
test(models): cover transcription settings navigation
alichherawalla 1afea0f
chore(pro): update release feedback features
alichherawalla 09e49ff
test(speech): cover configured language fallback
alichherawalla b142106
refactor(speech): centralize transcription status
alichherawalla f07824d
test(speech): cover transcription status
alichherawalla 5317125
ci(shared): build speech package before desktop checks
alichherawalla 0d0afeb
test(speech): cover transcription language IPC
alichherawalla 8af7828
chore(pro): update release feedback dependency
alichherawalla 3875d25
fix(speech): reconcile transferred transcription settings
alichherawalla 036819c
fix(ui): make panels and palette keyboard safe
alichherawalla a9c3a15
ci: test SQLite with the Node ABI
alichherawalla de7d010
fix(speech): fall back from stale transcription picks
alichherawalla 090e34f
ci: prepare SQLite before fast integration tests
alichherawalla 434f4c6
ci: align Desktop Pro feedback head
alichherawalla 476d479
ci: restore Electron SQLite after interrupted pushes
alichherawalla 2597a8b
fix(ui): close final navigation and focus gaps
alichherawalla ce64ee6
ci: report failed Electron ABI restoration
alichherawalla 04cfe08
fix(ui): harden routes and panel focus
alichherawalla 098af0f
chore(pro): align feedback integration head
alichherawalla f459c71
feat(win/ax): Windows accessibility rail via PowerShell + UI Automation
siddWednesday 5a1fbd3
fix(integrations): route provider verification
alichherawalla f84f1ea
fix(integrations): share Google OAuth callback
alichherawalla 7978b1d
chore(pro): align Calendar scope fix
alichherawalla 15776a6
chore(pro): bump submodule to the eviction/license fix (420b3c6)
siddWednesday 02e9a49
feat: complete Google connector authorization
alichherawalla 82f4bc3
refactor: animate shared side panels
alichherawalla 5cacb52
feat: add complete Desktop voice turns
alichherawalla 9810c20
chore: update Desktop Pro sync bridge
alichherawalla a6a8b35
feat(mcp): action-tool auth reads live per-device tokens
siddWednesday b10addf
ci(release): add artifact_only mode (signed DMG as a run artifact, no…
siddWednesday ca61029
test: cover Electron SQLite restoration
alichherawalla 70cf5ad
test: prove connector source lifecycle
alichherawalla ebd2f4a
refactor: simplify Desktop voice state presentation
alichherawalla 46a47ce
refactor: isolate connector authorization controls
alichherawalla c15d0ec
fix: validate persisted Desktop voice settings
alichherawalla 54e8548
refactor: clarify Desktop navigation and focus
alichherawalla 9057474
fix: make connector controls immutable
alichherawalla b3173f8
chore: update Pro browsing state boundary
alichherawalla ec9d16f
chore: update Pro advertising state boundary
alichherawalla e3791d7
docs: add Google OAuth and mesh release guide
alichherawalla 13ec731
chore: update Pro CI policy pointer
alichherawalla ef99f3d
feat(audio): show runtime voice readiness
alichherawalla dd3f0db
fix(time): share local calendar-day helpers
alichherawalla 3784408
Merge branch 'feat/windows-parity' into release/107-feedback
alichherawalla 00f7ecd
fix(chat): resolve Windows parity merge imports
alichherawalla 976b828
feat(speech): integrate private ExecuTorch runtime
alichherawalla 8929844
feat(chat): connect structured search tools
alichherawalla 5c06ccb
feat(settings): unify model and voice controls
alichherawalla 0197806
feat(chat): unify voice and source navigation
alichherawalla 8adb7e7
chore(pro): include chat tools and Windows parity
alichherawalla d40d761
Merge Windows parity into release/107-feedback
alichherawalla 5b116b0
fix(speech): show every runtime voice
alichherawalla 7248145
test(actions): preserve native DB test ABI
alichherawalla 44ad62b
fix(computer-use): retain recent vision steps
alichherawalla fe1b622
fix(tools): skip planning plain questions
alichherawalla 6589dcc
feat(explore): add local proposal deck skill
alichherawalla a703080
feat(actions): route approvals to execution chat
alichherawalla 2002819
chore(pro): include time transfer and action flows
alichherawalla 3b96309
fix(explore): use full-width proposal intake
alichherawalla 3c08902
feat(tasks): add persistent web and computer tabs
alichherawalla 1f5d63a
fix(explore): clarify proposal style references
alichherawalla 9e37ac3
fix(tasks): always open task history
alichherawalla 0052eff
feat(chat): explain completed work inline
alichherawalla c27dbfd
feat(chat): link installed skill mentions
alichherawalla ebbff37
feat(actions): continue approvals in chat
alichherawalla a853cb7
chore(pro): use one approval sync path
alichherawalla de40f64
fix(actions): use chat-only approval sync
alichherawalla 6fa6719
feat(progress): emit complete download facts
alichherawalla f829bc1
feat(progress): show complete download status
alichherawalla 83622c2
feat(browser): manage independent tab sessions
alichherawalla 7ab66a1
feat(tasks): retain computer use step details
alichherawalla f56fd42
feat(computer-use): add grounded runtime controls
alichherawalla 50c3a73
feat(computer-use): add UI-Mate policy adapter
alichherawalla e4d2e89
feat(tasks): add managed browser workspace
alichherawalla 7af051e
test(tasks): cover computer use settings route
alichherawalla 743e3eb
feat(computer-use): retain AX planning evidence
alichherawalla 21644d0
feat(computer-use): run UI-Mate vision policy
alichherawalla 47159c7
feat(computer-use): build model-governed vision pipeline
alichherawalla 8816c84
feat(desktop): add docked task workspace and live evidence
alichherawalla 5dbee0b
test(computer-use): cover governed web task journeys
alichherawalla 101eb4c
build(computer-use): add graph and secure-input support
alichherawalla ce1b7f9
docs(computer-use): record pipeline contract and gaps
alichherawalla df866c0
fix(computer-use): preserve immersive retry workspace
alichherawalla a054daa
feat(pro): gate browser and computer use
alichherawalla 6c537ec
build(pro): update desktop pro dependency
alichherawalla 84ea0e2
test(computer-use): assert immersive retry detail
alichherawalla 3395821
fix(pro): accept typed IPC handler boundaries
alichherawalla 2602008
build(pro): update desktop pro checks
alichherawalla 6df305e
test(renderer): align integration fixtures with live UI
alichherawalla 50bbbad
test(audio): require complete engine round trip
alichherawalla c26a2b1
build(pro): update desktop pro dependency
alichherawalla 3112cbc
test(e2e): preserve agentic evidence diagnostics
alichherawalla e4d7254
ci: secure cross-repo runtime checkout
alichherawalla 25a7cf2
ci(shared): build desktop ui dependency
alichherawalla 1769c2a
ci: allow complete coverage aggregation
alichherawalla 5f5d3ab
refactor(pro): move task surfaces behind private slots
alichherawalla d879714
test(pro): activate private task activity
alichherawalla c6309da
ci: allow manual verification runs
alichherawalla f1c12b6
fix(licensing): preserve effective pro status
alichherawalla 1c9475b
fix(tasks): verify smooth disclosure motion
alichherawalla 41a028e
ci(pro): use complete private verification workflow
alichherawalla ef29baa
fix(ci): close coverage hang and quality gate
alichherawalla 3989d26
fix(vision): route visual decisions through graph commands
alichherawalla b45b48c
fix(ci): gate aggregate new-code coverage
alichherawalla f2121f7
fix(chat): dock tasks below the chat header
alichherawalla 6de6360
chore(pro): update task workspace integration
alichherawalla c6a055a
fix(navigation): collapse the sidebar until hover
alichherawalla 031f899
fix(vision): normalize model action coordinates
alichherawalla aadc039
fix(browser): execute history hotkeys semantically
alichherawalla ca27f80
fix(ci): update DB journey contracts
alichherawalla 1e5b5d1
fix(browser): expose semantic navigation controls
alichherawalla d64ff0b
fix(startup): restore Electron SQLite ABI
alichherawalla c23e8f8
chore(pro): update task and startup fixes
alichherawalla 1b85374
fix(chat): show live edited Web Use progress
alichherawalla f255312
fix(chat): stream remote reasoning details
alichherawalla b1e3322
fix(chat): allow live task projection without result
alichherawalla d60fd3f
show Computer Use in active models
alichherawalla 5820a74
fix(browser): repaint live native surface
alichherawalla ee1f7d0
fix(browser): handle F5 as a native reload
alichherawalla b1c71cc
fix(tools): stop after launching a task
alichherawalla 9020c9e
fix(web-use): use one specialist lifecycle owner
alichherawalla 6c37d4b
test(chat): cover reasoning after message edit
alichherawalla 6bed3df
fix(computer-use): preflight macOS permissions
alichherawalla 4944c40
feat(computer-use): use native vision tools
alichherawalla 338b01d
fix(computer-use): honor specialist action protocols
alichherawalla 6c21462
fix(computer-use): own specialist lifecycle once
alichherawalla 57c9a80
refactor(computer-use): share the vision task graph
alichherawalla a2b2cd3
test(computer-use): cover macOS graph journey
alichherawalla 705a78d
fix(ui-mate): use the exact current coordinate frame
alichherawalla 45ee0a5
fix(browser): keep live pointer visible
alichherawalla 48e5f25
fix(tasks): show exact model screenshot
alichherawalla d12c55b
fix(tasks): keep pane open when expanding chat
alichherawalla 067db5e
fix(vision): reject mismatched model frames
alichherawalla 8c355a6
fix(tasks): restore chat beside task pane
alichherawalla d23242f
fix(web-use): gate completion on every milestone
alichherawalla 0e96912
fix(web-use): generate distinct visible milestones
alichherawalla 2be7bf4
fix(ui-mate): scope completion to active milestone
alichherawalla 08112a4
fix(computer-use): normalize UI-Mate scroll distance
alichherawalla aea8ae1
fix(ui): centralize chat task pane state
alichherawalla c415534
fix(web-use): stabilize visual coordinate grounding
alichherawalla b07e83d
feat(web-use): unify browser control guidance
alichherawalla 797a8f4
fix(ui-mate): advance focused task milestones
alichherawalla f1125a7
fix(ui): open dropdown menus above side panels
alichherawalla 332e483
docs(brand): say "Off Grid AI" everywhere
alichherawalla 2ff3524
feat(settings): let you cap what the model spends on thinking
alichherawalla 64d98d9
refactor(chat): move the image lightbox into its own component
alichherawalla b88c3ca
refactor(chat): let the pane controller decide the toggle label
alichherawalla b46c6a6
refactor(vision): delete the superseded task runner
alichherawalla 9751ae3
refactor(vision): one owner for the scroll step and point mapping
alichherawalla bdc6378
refactor(vision): drop the redundant first-load branch
alichherawalla 16c9e9d
perf(vision): build the coordinate grid once per frame size
alichherawalla d07085d
refactor(vision): read permissions through the shared checks
alichherawalla c8677cd
perf(web-use): encode each captured frame once
alichherawalla 9c652b2
perf(web-use): only touch the native view when something changed
alichherawalla f89e1e8
refactor(web-use): one table for the browser shortcuts
alichherawalla 96dc804
refactor(tools): make "is a task" a property of the tool
alichherawalla d373786
docs(gaps): log the duplicated Computer Use model rule
alichherawalla aed1392
test(tools): assert the pro refusal is authoritative
alichherawalla 9bf2ab5
feat(tasks): open Computer Use screenshots full size
alichherawalla 6a24f8b
chore(pro): bump the submodule
alichherawalla e94d2b2
test(e2e): add the agentic studio screenshots
alichherawalla 999725c
fix(speech): stop the audio seam pulling the app database into every …
alichherawalla 2870c76
fix(ui): make the side panel flush to the window edge
alichherawalla 3ba66a5
fix(settings): give the tab row room instead of slicing a tab off
alichherawalla 40ed16e
docs(doctrine): sync the mirrored debugging doctrine
alichherawalla d4789a6
fix(tools): list the native actions in the Tools tab
alichherawalla f8f26c1
perf(embeddings): run the embedding pipeline off the main thread
alichherawalla e08ef1c
perf(tasks): redact step details once, on write, not on every read
alichherawalla 85a59fa
perf(tasks): parse a step-details blob once, not once per token
alichherawalla 68ff14e
fix(models): ring the whole search field, not the bare input
alichherawalla 68ccd4e
perf(tasks): stop streaming display state through the durable store
alichherawalla 18b976c
fix(tasks): resume a retry at the phase it reached, not phase 1
alichherawalla b24717e
test(models): derive Computer Use counts from the catalog
alichherawalla 8771a29
fix(settings): honour the thinking cap on remote models, and nest the…
alichherawalla ce05218
fix(llm): clear the two lint errors in the remote chat stream
alichherawalla f4ccb73
refactor(llm): decompose the remote chat transport
alichherawalla c963af9
feat(web-use): float a running task in an always-on-top window
alichherawalla a7190ec
fix(vision): retry a model that reasons but calls no tool
alichherawalla 1bf05cf
Revert "feat(web-use): float a running task in an always-on-top window"
alichherawalla e1e1224
fix(nav,vision): match sidebar states, drop the leave prompt, replay …
alichherawalla 9c85617
fix(vision): Same as Chat uses the general operator, whatever the mod…
alichherawalla ce9707e
fix(vision): a specialist parser claims only what it can parse
alichherawalla 9d6b827
fix(vision,browser): retry as a user turn, and one real cursor
alichherawalla 41aa235
feat(chat): answer the chat-icon question from the current view
alichherawalla 5cca388
fix(browser): paint the agent cursor with CSS so Trusted Types cannot…
alichherawalla 6d5443a
feat(tasks): let the docked task surface declare that it is on screen
alichherawalla 133a2d0
feat(browser): main decides which surface hosts the live page
alichherawalla 0153745
fix(browser): size the viewport tolerance to the zoom, and say why a …
alichherawalla 057932c
fix(browser): give every named key a real keycode, and hide the chat …
alichherawalla d4bef06
test: give jsdom a scrollIntoView
alichherawalla b6a8f53
feat(llm): measure what a generation cost
alichherawalla c0a548d
feat(vision): measure capture time and model time per step
alichherawalla 614d50f
feat(chat): show what a generation cost under the answer
alichherawalla 673db50
feat(chat): put generation details behind a preference, off by default
alichherawalla 02625e4
perf(tasks): stop persisting the model prompt with every step
alichherawalla 1c67ac8
chore: bump pro for the floating-card tests
alichherawalla 0d73c78
fix(embeddings): keep source search on vector path
alichherawalla 3870fd2
fix(speech): migrate legacy voices and journeys
alichherawalla d395736
chore(pro): advance verified release runtime
alichherawalla b932479
fix(transcription): retry Hindi script misses
alichherawalla 1dbb72a
feat(voice): add tested resend action
alichherawalla be4977c
fix(chat): explain unavailable remote thinking
alichherawalla bccc881
fix(browser): harden driver identity and shortcuts
alichherawalla 72769cb
ci: run database journeys on Node 26
alichherawalla a7496bc
ci: use compatible Node for SQLite journeys
alichherawalla 167aac6
fix(computer-use): make task controls terminal
alichherawalla bc7da76
refactor(web-use): retire the web_task tool name
alichherawalla 2782eef
fix(actions): keep task approval in its owner
alichherawalla 56b0f2d
fix(computer-use): publish AX frames to supervisor
alichherawalla cbc952f
chore(release): integrate Computer Use supervisor fixes
alichherawalla 674a12d
test(computer-use): prove Stop crosses the live control path
alichherawalla e5dfd07
test(actions): bind inline gate fixture to its chat
alichherawalla 8d40754
fix(computer-use): bound screen capture failure
alichherawalla 1fd58ba
chore(release): integrate final Pro journey tests
alichherawalla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule pro
updated
from 898703 to cf490e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/sh | ||
|
|
||
| # Verify the native SQLite module with Electron's ABI after Node-based database tests. The optional | ||
| # executable argument is the external-process boundary used by the regression test. | ||
| prefix="${1:-[sqlite]}" | ||
| electron_binary="${2:-./node_modules/electron/dist/Electron.app/Contents/MacOS/Electron}" | ||
|
|
||
| if ELECTRON_RUN_AS_NODE=1 "$electron_binary" \ | ||
| -e 'new (require("better-sqlite3-multiple-ciphers"))(":memory:")' >/dev/null 2>&1; then | ||
| echo "$prefix Electron ABI restored (app can load sqlite)." | ||
| else | ||
| echo "$prefix WARNING: Electron cannot load sqlite - run 'npx electron-rebuild -f -w better-sqlite3-multiple-ciphers' before launching the app." | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/__tests__/electron-sqlite-probe.integration.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { spawnSync } from 'node:child_process' | ||
| import path from 'node:path' | ||
| import { describe, expect, it } from 'vitest' | ||
|
|
||
| const PROBE = path.resolve(process.cwd(), 'scripts/probe-electron-sqlite.sh') | ||
|
|
||
| function runProbe(executable: '/usr/bin/true' | '/usr/bin/false'): string { | ||
| const result = spawnSync('/bin/sh', [PROBE, '[pre-push]', executable], { | ||
| encoding: 'utf8' | ||
| }) | ||
| expect(result.status).toBe(0) | ||
| expect(result.stderr).toBe('') | ||
| return result.stdout.trim() | ||
| } | ||
|
|
||
| describe('Electron SQLite restoration probe', () => { | ||
| it('reports that Electron can load the restored native module', () => { | ||
| expect(runProbe('/usr/bin/true')).toBe( | ||
| '[pre-push] Electron ABI restored (app can load sqlite).' | ||
| ) | ||
| }) | ||
|
|
||
| it('reports the exact rebuild action when Electron cannot load SQLite', () => { | ||
| expect(runProbe('/usr/bin/false')).toBe( | ||
| "[pre-push] WARNING: Electron cannot load sqlite - run 'npx electron-rebuild -f -w better-sqlite3-multiple-ciphers' before launching the app." | ||
| ) | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import { describe, expect, it, vi } from 'vitest' | ||
| import { beginOAuthAuthorization, cancelOAuthAuthorization } from '../mcp-oauth-cancellation' | ||
|
|
||
| describe('connector OAuth cancellation registry', () => { | ||
| it('cancels only the named connector and clears the registration', () => { | ||
| const first = vi.fn() | ||
| const second = vi.fn() | ||
| beginOAuthAuthorization(101, first) | ||
| beginOAuthAuthorization(202, second) | ||
|
|
||
| expect(cancelOAuthAuthorization(101)).toBe(true) | ||
| expect(first).toHaveBeenCalledWith( | ||
| expect.objectContaining({ message: 'Authorization cancelled' }) | ||
| ) | ||
| expect(second).not.toHaveBeenCalled() | ||
| expect(cancelOAuthAuthorization(101)).toBe(false) | ||
|
|
||
| cancelOAuthAuthorization(202) | ||
| }) | ||
|
|
||
| it('cancels an older attempt when a connector starts a new one', () => { | ||
| const older = vi.fn() | ||
| const newer = vi.fn() | ||
| beginOAuthAuthorization(303, older) | ||
| const finishNewer = beginOAuthAuthorization(303, newer) | ||
|
|
||
| expect(older).toHaveBeenCalledWith( | ||
| expect.objectContaining({ message: 'Authorization superseded by a newer request' }) | ||
| ) | ||
| finishNewer() | ||
| expect(cancelOAuthAuthorization(303)).toBe(false) | ||
| expect(newer).not.toHaveBeenCalled() | ||
| }) | ||
|
|
||
| it('does not let an older completion clear a newer attempt', () => { | ||
| const older = vi.fn() | ||
| const newer = vi.fn() | ||
| const finishOlder = beginOAuthAuthorization(404, older) | ||
| beginOAuthAuthorization(404, newer) | ||
|
|
||
| finishOlder() | ||
| expect(cancelOAuthAuthorization(404)).toBe(true) | ||
| expect(newer).toHaveBeenCalledWith( | ||
| expect.objectContaining({ message: 'Authorization cancelled' }) | ||
| ) | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import { describe, expect, it } from 'vitest' | ||
| import { OAuthPkceVerifier } from '../mcp-oauth-pkce' | ||
|
|
||
| describe('OAuth PKCE verifier lifecycle', () => { | ||
| it('keeps the verifier when the SDK invalidates all credentials before an exchange retry', () => { | ||
| const verifier = new OAuthPkceVerifier() | ||
| verifier.save('attempt-verifier') | ||
|
|
||
| verifier.invalidate('all') | ||
|
|
||
| expect(verifier.read()).toBe('attempt-verifier') | ||
| }) | ||
|
|
||
| it('clears the verifier after tokens are saved', () => { | ||
| const verifier = new OAuthPkceVerifier() | ||
| verifier.save('attempt-verifier') | ||
|
|
||
| verifier.complete() | ||
|
|
||
| expect(() => verifier.read()).toThrow('missing PKCE code verifier') | ||
| }) | ||
|
|
||
| it('clears the verifier when authorization is cancelled', () => { | ||
| const verifier = new OAuthPkceVerifier() | ||
| verifier.save('attempt-verifier') | ||
|
|
||
| verifier.cancel() | ||
|
|
||
| expect(() => verifier.read()).toThrow('missing PKCE code verifier') | ||
| }) | ||
|
|
||
| it('honors explicit verifier invalidation during an active attempt', () => { | ||
| const verifier = new OAuthPkceVerifier() | ||
| verifier.save('attempt-verifier') | ||
|
|
||
| verifier.invalidate('verifier') | ||
|
|
||
| expect(() => verifier.read()).toThrow('missing PKCE code verifier') | ||
| }) | ||
| }) |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.