Skip to content
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

WIP: Sidepanel #138

Draft
wants to merge 48 commits into
base: main
Choose a base branch
from
Draft

WIP: Sidepanel #138

wants to merge 48 commits into from

Conversation

jfschwarz
Copy link
Collaborator

@jfschwarz jfschwarz commented Sep 20, 2024

  • Make connecting/disconnecting on panel toggle reliable
    • monitoring: Show reload hint for stale tabs (à la Rabby), auto-reload the current tab when opening the panel
    • Reconnect when reopening
  • Sometimes there are still duplicated injections (transactions are recorded double)
  • Handle tabs that were open before the extension was installed (no monitoring injected)
  • Make simulation start/stop handling reliable
  • Host connect.pilot.gnosisguild.org
  • Stop intercepting/tracking RPC traffic on panel close
    • Test
  • Test concurrent sessions (with and without simulations) in different windows
  • Connect to MetaMask from Panel
    • Implement EIP1193 provider to use from app, event subscription mgmt & event deduplication (multiple iframes)
    • Can only use iframe on visible tabs for connecting to wallet (rpc requests won’t be handled otherwise)
      • Scenario: open pilot on chrome:// tab, switch to regular tab -> rpc requests are only handled then
      • Try to implement a timeout (connect via different tab after timeout)
    • Immediately inject connect iframe to all open tabs on panel open (otherwise we depend on tab reload before we can interact with the user wallet)
    • Make error handling work (test: reject wallet request)
    • Handle disconnects
    • Test event relaying (account/chain switches)
    • Handle the case that no regular tab is open (only chrome://) -> open a new tab with https://connect.pilot/.gnosisguild.org
  • Make inject (former EIP1193 bridge) work again (now the panel app has access to chrome. APIs!)
    • Test
    • Integrate in panel
  • Make rpc redirect urlFilter use urlRegex and combine all rpc urls with ORs (|)
    • Test
  • Migrate routes to extension storage https://developer.chrome.com/docs/extensions/reference/api/storage
    • Test
  • Update developer docs
  • Panel design updates (Figma designs need to be adjusted to support smaller width)
  • Test connecting to Etherscan

Copy link

cloudflare-workers-and-pages bot commented Sep 30, 2024

Deploying zodiac-pilot-connect with  Cloudflare Pages  Cloudflare Pages

Latest commit: d8e71e4
Status: ✅  Deploy successful!
Preview URL: https://6f5efddd.zodiac-pilot.pages.dev
Branch Preview URL: https://sidepanel.zodiac-pilot.pages.dev

View logs

Copy link

vercel bot commented Oct 15, 2024

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

Name Status Preview Comments Updated (UTC)
zodiac-pilot-example-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 1:12pm

* update setup

* start rewriting connect logic to always use current tab

* rewrite connect provider to use currently active tab

* only render pilot when a connection to the current tab is established

* split up components

* do not require full react import in every file

* improve tab update handling

* updating to an unsupported url tears down the port

* consistent style

* clear urls from cache when disconnecting

* do not generate request ids from stale data
…ted (#164)

* add prettier plugin to organize imports

* update imports

* mimic wallet connect context

* disable meta mask connect when the injected provider is not connected
* initial playwright setup

* move playwright workflow

* change default working dir

* try to run e2e tests against example app

* only install chromium

* make tests run locally as well

* only use chromium in config

* give playwright access to vercel deploys

* rename spec
* add fixture to load extension

* add button to example app to open panel

* wip add button to open extension panel

* add package manager field for example app

* open side panel from example app

* interact with extension

* remove console.log

* update test env

* update env template

* update reporter

* try running tests headed

* always run tests headed

* wait for extension to load

* less repetition
* switch to pnpm

* replace yarn calls with pnpm

* update actions

* make sure pnpm is available

* pnpm

* adjust playwright pipeline
* remove old safe bridge

* fix type error

* rename job

* add unit tests to pipeline

* update vitest

* patch vitest-chrome

* remove example spec

* add patch to package.json

* update lockfile

* remove yarn specifics

* update lockfile

* fix formatting and linting

* update spelling config

* make esbuild script esm compliant

* ESM ESM ESM

* remove import side-effect

* use ref to resolve import conundrum

* update snapshots

* do not allow lint warnings
* update rimraf; add web3-mock

* handle some esm stuff

* add tailwind support

* improve padding

* remove unused code

* remove unused param

* checks config

* remove new test
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