Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b5d9439
First cut.
nedtwigg Sep 5, 2025
f6ca1dc
Inject the gitcasso extension into the `har` renders.
nedtwigg Sep 5, 2025
f52c484
Our extension loads!
nedtwigg Sep 5, 2025
751816e
har:view now fixes the URL. domain is still weird though...
nedtwigg Sep 5, 2025
df73818
Instead of doing `window.location.hostname`, look at `document.queryS…
nedtwigg Sep 5, 2025
f60d2e0
Update readme.
nedtwigg Sep 5, 2025
464cda2
Use a map instead of lsit of lists.
nedtwigg Sep 5, 2025
bee258e
biome:fix
nedtwigg Sep 5, 2025
12170ea
compile errors
nedtwigg Sep 5, 2025
78b0d13
biome manual fixup.
nedtwigg Sep 5, 2025
26aad2f
Use the har to make snapshots.
nedtwigg Sep 5, 2025
274471b
Swap happy-dom for linkedom.
nedtwigg Sep 6, 2025
193c00e
More simplifications.
nedtwigg Sep 6, 2025
50454e6
Fix all CI stuff.
nedtwigg Sep 6, 2025
78a9cae
Simplify HAR parsing.
nedtwigg Sep 6, 2025
f4191b1
More pruning.
nedtwigg Sep 6, 2025
48c389d
We're not running coverage at all right now.
nedtwigg Sep 6, 2025
b351215
Cleanup plan.
nedtwigg Sep 6, 2025
e9cb9ca
Add typings for the `har-format` lib.
nedtwigg Sep 6, 2025
6ec1090
Put the `har` stuff into a test fixture.
nedtwigg Sep 6, 2025
0785955
Don't need `setup.ts` anymore.
nedtwigg Sep 6, 2025
a3bc35d
better har integration
nedtwigg Sep 6, 2025
2ac9c89
Huge simplification.
nedtwigg Sep 6, 2025
5f7fd00
Progress...
nedtwigg Sep 6, 2025
87dec04
Cleaned WAY up, getting there...
nedtwigg Sep 6, 2025
1a3f58c
Merge branch 'main' into feat/testing-take-2
nedtwigg Sep 6, 2025
b49f29d
Merge branch 'main' into feat/testing-take-2
nedtwigg Sep 6, 2025
2d4b492
Cleanup the PR one.
nedtwigg Sep 6, 2025
b541523
disable the id check in githubIssueAddComment
nedtwigg Sep 6, 2025
b6961f1
Add snapshot updating info to README
nedtwigg Sep 6, 2025
c338684
Add a test for issues too.
nedtwigg Sep 6, 2025
a5efb9e
Don't need this anymore.
nedtwigg Sep 6, 2025
bc18d43
Make refresh work when viewing gitcasso-modified with `har:view`
nedtwigg Sep 6, 2025
74889ed
Remove debug logging.
nedtwigg Sep 6, 2025
d8041ba
Fix biome
nedtwigg Sep 6, 2025
b7afcf5
Unnecessary error-checking.
nedtwigg Sep 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ dist/
# OS junk
.DS_Store
Thumbs.db

# playright
browser-extension/playwright-report/
browser-extension/playwright/
browser-extension/test-results/
19 changes: 19 additions & 0 deletions browser-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- `npm run biome:fix` - fixes most of what `biome check` finds
- `npm run compile` - typechecking
- `npm test` - vitest
- `npm test -- -u` updates all the snapshots

### Deployment
- `npm run build` - build for mv3 for most browsers
Expand All @@ -42,3 +43,21 @@ Every time a `textarea` shows up on a page, on initial load or later on, it gets
Those values get bundled up with the `HTMLTextAreaElement` itself into an `EnhancedTextarea`, which gets added to the `TextareaRegistry`. At some interval, draft edits will get saved by the browser extension (TODO).

When the `textarea` gets removed from the page, the `TextareaRegistry` is notified so that the `CommentSpot` can be marked as abandoned or submitted as appropriate (TODO).

## Testing

In `tests/har` there are various `.har` files. These are complete recordings of a single page load.

- `npm run har:view` and you can see the recordings, with or without our browser extension.

### Recording new HAR files

- you can add or change URLs in `tests/har-index.ts`
- `npx playwright codegen https://github.com/login --save-storage=playwright/.auth/gh.json` will store new auth tokens
- login manually, then close the browser
- ***these cookies are very sensitive! we only run this script using a test account that has no permissions or memberships to anything, recommend you do the same!***
- `npm run har:record` this records new snapshots using those auth tokens (it needs args, run it with no args for docs)
- DO NOT COMMIT AND PUSH NEW OR CHANGED `har` files!
- we try to sanitize these (see `har-record.ts` for details) but there may be important PII in them
- if you need new HAR files for something, let us know and we will generate them ourselves using a dummy account
- IF YOUR PR CHANGES OR ADDS HAR FILES WE WILL CLOSE IT. Ask for HAR files and we'll be happy to generate clean ones you can test against.
Loading