diff --git a/browser-extension/README.md b/browser-extension/README.md index d4cfe15..1b3afb5 100644 --- a/browser-extension/README.md +++ b/browser-extension/README.md @@ -84,9 +84,9 @@ We maintain a corpus of test pages in two formats for testing the browser extens - `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!*** - - `pnpm run corpus:record:har` records new HAR files using those auth tokens (it needs args, run it with no args for docs) + - `pnpm run corpus:har:record` records new HAR files 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 + - we try to sanitize these (see `corpus-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. diff --git a/browser-extension/package.json b/browser-extension/package.json index eb4fef4..1ffb822 100644 --- a/browser-extension/package.json +++ b/browser-extension/package.json @@ -62,7 +62,7 @@ "test": "vitest run", "playground": "vite --config vite.playground.config.ts", "playground:build": "vite build --config vite.playground.config.ts", - "corpus:record:har": "tsx tests/har-record.ts", + "corpus:har:record": "tsx tests/corpus-har-record.ts", "corpus:view": "tsx tests/corpus-view.ts" }, "type": "module", diff --git a/browser-extension/tests/har-record.ts b/browser-extension/tests/corpus-har-record.ts similarity index 98% rename from browser-extension/tests/har-record.ts rename to browser-extension/tests/corpus-har-record.ts index eb9af1b..4990a3e 100644 --- a/browser-extension/tests/har-record.ts +++ b/browser-extension/tests/corpus-har-record.ts @@ -65,7 +65,7 @@ function stripHeaders(headers?: any[]) { async function sanitize(filename: string) { console.log('Sanitizing:', filename) - const p = path.join('tests/corpus/har', filename) + const p = path.join('tests/corpus', filename) const har = JSON.parse(await fs.readFile(p, 'utf8')) for (const e of har.log?.entries ?? []) { diff --git a/browser-extension/tests/corpus/_corpus-index.ts b/browser-extension/tests/corpus/_corpus-index.ts index b240898..d985669 100644 --- a/browser-extension/tests/corpus/_corpus-index.ts +++ b/browser-extension/tests/corpus/_corpus-index.ts @@ -12,6 +12,11 @@ export const CORPUS: Record = { type: 'har', url: 'https://github.com/diffplug/selfie/issues/523', }, + gh_issue_edit: { + description: 'editing an existing comment on an issue', + type: 'html', + url: 'https://github.com/diffplug/gitcasso/issues/56', + }, gh_issue_populated_comment: { description: 'comment text box has some text', type: 'html', @@ -29,11 +34,33 @@ export const CORPUS: Record = { type: 'har', url: 'https://github.com/diffplug/selfie/pull/517', }, - // HTML corpus (captured after user interactions via SingleFile) - // Add new entries here as needed, e.g.: - // gh_issue_with_comment_preview: { - // url: 'https://github.com/diffplug/selfie/issues/523', - // type: 'html', - // description: 'Issue page with comment textarea expanded and preview tab active' - // } + gh_pr_edit: { + description: 'editing an existing comment on a PR', + type: 'html', + url: 'https://github.com/diffplug/gitcasso/pull/58', + }, + gh_project: { + description: 'github project board initial load', + type: 'html', + url: 'https://github.com/orgs/diffplug/projects/12', + }, + gh_project_draft: { + type: 'html', + url: 'https://github.com/orgs/diffplug/projects/12/views/1?pane=issue&itemId=129503329', + }, + gh_project_draft_edit: { + description: 'editing an existing comment on a draft issue within a project', + type: 'html', + url: 'https://github.com/orgs/diffplug/projects/12/views/1?pane=issue&itemId=129503329', + }, + gh_project_issue: { + description: 'github project board issue add comment', + type: 'html', + url: 'https://github.com/orgs/diffplug/projects/12/views/1?pane=issue&itemId=129503239&issue=diffplug%7Cgitcasso%7C57', + }, + gh_project_issue_edit: { + description: 'editing an existing comment on a issue within a project', + type: 'html', + url: 'https://github.com/orgs/diffplug/projects/12/views/1?pane=issue&itemId=129503239&issue=diffplug%7Cgitcasso%7C57', + }, } as const diff --git a/browser-extension/tests/corpus/gh_issue_edit.html b/browser-extension/tests/corpus/gh_issue_edit.html new file mode 100644 index 0000000..67037af --- /dev/null +++ b/browser-extension/tests/corpus/gh_issue_edit.html @@ -0,0 +1,1529 @@ + + + + + + + + + + + + + + + + + +what about the draft? · Issue #56 · diffplug/gitcasso + +
+
+ +
+ Skip to content + + + + + + + + +
+
+ + + + + + +
+
+
+ +
+ + + +
+
+ + + + + +

what about the draft? #56

@cavia-porcellus

Description

Body input
Markdown input: edit mode selected.

Activity

cavia-porcellus

Add a comment

new Comment
Markdown input: edit mode selected.
Remember, contributions to this repository should follow its contributing guidelines.

Metadata

Metadata

Assignees

No one -

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Notifications

        You're receiving notifications because you're subscribed to this thread.

        Participants

        @cavia-porcellus

        Issue actions

        +
        +
        +
        + + + + + + + + +
        +
        what about the draft? · Issue #56 · diffplug/gitcasso
        +
        16 results
        + + \ No newline at end of file diff --git a/browser-extension/tests/corpus/gh_pr_edit.html b/browser-extension/tests/corpus/gh_pr_edit.html new file mode 100644 index 0000000..8482fd8 --- /dev/null +++ b/browser-extension/tests/corpus/gh_pr_edit.html @@ -0,0 +1,5967 @@ + + + + + + + + + + +Feat/expand corpus by cavia-porcellus · Pull Request #58 · diffplug/gitcasso + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        + +
        + Skip to content + + + + + + + + +
        +
        + + + + + + +
        +
        +
        + +
        + + + +
        +
        +
        + + + + + + + + +
        + Open in github.dev + Open in a new github.dev tab + Open in codespace + + +
        +
        + +
        + + +
        + +
        + + +
        +
        +

        Conversation

        +
        + + +
        +
        +
        + cavia-porcellus + + +
        +
        +
        +
        +
        + + + + + + + + + + + + Copy link +
        +
        + + + + +
        +
        +
        +
        + + +
        +

        +
        + @cavia-porcellus + + cavia-porcellus + + + + commented + Sep 18, 2025 + +
        +

        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + +
        +
        + + +
        + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        + + +
        + + + + + + +
        +
        +

        + The content you are editing has changed. + Please copy your edits and refresh the page. +

        + +
        + + + + + + +
        + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + + + + + + + + + + + + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        + +
        + + +
        +
        + +
        +
        +
        + +
        +
        +
        +
        + + +
        +
        + +
        +
        + +
        +
        nedtwigg + + added 2 commits + September 18, 2025 01:33
        +
        +
        + +
        +
        +
        +
        + +
        +
        + + @nedtwigg +
        +
        + +
        + +
        +
        +
        + +
        +
        +
        + + cae2306 + +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        + + @nedtwigg +
        +
        + +
        + +
        +
        +
        + + + + + + +
        +
        +
        + + 959368f + +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        + +
        +
        +
        +
        +
        + + + + + +

        Merge info

        Some checks haven't completed yet

        1 in progress check

        in progress checks

        No conflicts with base branch

        Changes can be cleanly merged.

        +
        +
        +
        + + +
        +
        + @cavia-porcellus +
        +
        +
        + + +
        + +

        Add a comment

        + + + +
        +
        + + +
        + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        + + +
        + + + + + + +
        + + +
        + + + +
        + +
        +
        + +
        + +
        + + +
        +
        +
        + +
        + + + + + + + + + + + + +
        +
        +
        + +
        +
        + + +
        +
        +
        + +
        +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        + Remember, contributions to this repository should follow + its + + contributing guidelines. +
        +
        + + ProTip! + Add comments to specific lines under Files changed. +
        +
        +
        +
        +
        +
        +
        +
        + + + +
        + +
        + + + Labels + + +
        + Apply labels to this pull request + +
        +
        +
        + + + Loading + +
        +
        + +
        +
        +
        + None yet +
        +
        + +
        +
        +
        + + + Projects + + +
        + Projects + +
        + + +
        +
        +
        +
        + + None yet + +
        + + + + + +
        +
        +
        + +
        + +
        + Development +
        + +

        Successfully merging this pull request may close these issues.

        +
        +

        None yet

        +
        +
        +
        +
        +
        +
        + + +
        +
        +
        + 2 participants +
        + +
        +
        + + + +
        +
        + +
        +
        + +
        +
        +
        +
        +
        +
        + + + + + + + + +
        +
        +
        + + \ No newline at end of file diff --git a/browser-extension/tests/corpus/gh_project.html b/browser-extension/tests/corpus/gh_project.html new file mode 100644 index 0000000..e7a3734 --- /dev/null +++ b/browser-extension/tests/corpus/gh_project.html @@ -0,0 +1,1519 @@ + + + + + + + + + + + + +Backlog · Gitcasso + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        + +
        + + + + + +
        + +
        + +
        +
        + + Select an owner + + + + + + Loading + + + +
        +
        +
        + +
        +
        + +
        +
        +
        + +
        + Skip to content + + + + + + + + +
        +
        + + + + + + +
        +
        +
        + +
        + + + +
        +
        + +
        + +
        +

          Unrefined

           (6 / 999)
          Estimate: 0
            Click a value to filter the view
              Click a value to filter the view
                Click a value to filter the view
                  Click a value to filter the view
                    Click a value to filter the view
                      Click a value to filter the view

                      1.0 Backlog

                       (6)
                      Estimate: 0
                      gitcasso #52

                      color nitpicks

                        Click a value to filter the view
                        gitcasso #55

                        make corpus:view less gappy

                          Click a value to filter the view
                            Click a value to filter the view
                            gitcasso #30

                            Snapshots for Reddit, GitLab, etc.

                              Click a value to filter the view
                              gitcasso #57

                              what about drafts?

                                Click a value to filter the view
                                Draft

                                make another draft

                                  Click a value to filter the view

                                  0.1 Backlog

                                   (0)
                                  Estimate: 0

                                  In Progress

                                   (2 / 5)
                                  Estimate: 0
                                  This is actively being worked on

                                  In PR

                                   (1)
                                  Estimate: 0

                                  Done

                                   (25)
                                  Estimate: 0
                                  This has been completed
                                  + + + + +
                                    +
                                    + + + + + + + +
                                    +
                                    Backlog · Gitcasso
                                    +
                                    + +
                                    \ No newline at end of file diff --git a/browser-extension/tests/corpus/gh_project_draft.html b/browser-extension/tests/corpus/gh_project_draft.html new file mode 100644 index 0000000..3eb96f1 --- /dev/null +++ b/browser-extension/tests/corpus/gh_project_draft.html @@ -0,0 +1,1519 @@ + + + + + + + + + + + + +make another draft · Gitcasso + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                    +
                                    + +
                                    + + + + + +
                                    + +
                                    + +
                                    +
                                    + + Select an owner + + + + + + Loading + + + +
                                    +
                                    +
                                    + +
                                    +
                                    + +
                                    +
                                    +
                                    + +
                                    + Skip to content + + + + + + + + +
                                    +
                                    + + + + + + +
                                    +
                                    +
                                    + +
                                    + + + +
                                    +
                                    + +
                                    + +
                                    +

                                      Unrefined

                                       (6 / 999)
                                      Estimate: 0
                                        Click a value to filter the view
                                          Click a value to filter the view
                                            Click a value to filter the view
                                              Click a value to filter the view
                                                Click a value to filter the view
                                                  Click a value to filter the view

                                                  1.0 Backlog

                                                   (6)
                                                  Estimate: 0
                                                  gitcasso #52

                                                  color nitpicks

                                                    Click a value to filter the view
                                                    gitcasso #55

                                                    make corpus:view less gappy

                                                      Click a value to filter the view
                                                        Click a value to filter the view
                                                        gitcasso #30

                                                        Snapshots for Reddit, GitLab, etc.

                                                          Click a value to filter the view
                                                          gitcasso #57

                                                          what about drafts?

                                                            Click a value to filter the view
                                                            Draft

                                                            make another draft

                                                              Click a value to filter the view

                                                              0.1 Backlog

                                                               (0)
                                                              Estimate: 0

                                                              In Progress

                                                               (2 / 5)
                                                              Estimate: 0
                                                              This is actively being worked on

                                                              In PR

                                                               (1)
                                                              Estimate: 0

                                                              Done

                                                               (25)
                                                              Estimate: 0
                                                              This has been completed
                                                              + + + + +
                                                                +
                                                                + + + + + + + +
                                                                +
                                                                make another draft · Gitcasso
                                                                +
                                                                + + \ No newline at end of file diff --git a/browser-extension/tests/corpus/gh_project_draft_edit.html b/browser-extension/tests/corpus/gh_project_draft_edit.html new file mode 100644 index 0000000..d4aad13 --- /dev/null +++ b/browser-extension/tests/corpus/gh_project_draft_edit.html @@ -0,0 +1,1519 @@ + + + + + + + + + + + + +make another draft · Gitcasso + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                +
                                                                + +
                                                                + + + + + +
                                                                + +
                                                                + +
                                                                +
                                                                + + Select an owner + + + + + + Loading + + + +
                                                                +
                                                                +
                                                                + +
                                                                +
                                                                + +
                                                                +
                                                                +
                                                                + +
                                                                + Skip to content + + + + + + + + +
                                                                +
                                                                + + + + + + +
                                                                +
                                                                +
                                                                + +
                                                                + + + +
                                                                +
                                                                + +
                                                                + +
                                                                +

                                                                  Unrefined

                                                                   (6 / 999)
                                                                  Estimate: 0
                                                                    Click a value to filter the view
                                                                      Click a value to filter the view
                                                                        Click a value to filter the view
                                                                          Click a value to filter the view
                                                                            Click a value to filter the view
                                                                              Click a value to filter the view

                                                                              1.0 Backlog

                                                                               (6)
                                                                              Estimate: 0
                                                                              gitcasso #52

                                                                              color nitpicks

                                                                                Click a value to filter the view
                                                                                gitcasso #55

                                                                                make corpus:view less gappy

                                                                                  Click a value to filter the view
                                                                                    Click a value to filter the view
                                                                                    gitcasso #30

                                                                                    Snapshots for Reddit, GitLab, etc.

                                                                                      Click a value to filter the view
                                                                                      gitcasso #57

                                                                                      what about drafts?

                                                                                        Click a value to filter the view
                                                                                        Draft

                                                                                        make another draft

                                                                                          Click a value to filter the view

                                                                                          0.1 Backlog

                                                                                           (0)
                                                                                          Estimate: 0

                                                                                          In Progress

                                                                                           (2 / 5)
                                                                                          Estimate: 0
                                                                                          This is actively being worked on

                                                                                          In PR

                                                                                           (1)
                                                                                          Estimate: 0

                                                                                          Done

                                                                                           (25)
                                                                                          Estimate: 0
                                                                                          This has been completed
                                                                                          + + + + +
                                                                                            +
                                                                                            + + + + + + + +
                                                                                            +
                                                                                            make another draft · Gitcasso
                                                                                            +
                                                                                            + + \ No newline at end of file diff --git a/browser-extension/tests/corpus/gh_project_issue.html b/browser-extension/tests/corpus/gh_project_issue.html new file mode 100644 index 0000000..7444c5b --- /dev/null +++ b/browser-extension/tests/corpus/gh_project_issue.html @@ -0,0 +1,1519 @@ + + + + + + + + + + + + +what about drafts? · Gitcasso + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            +
                                                                                            + +
                                                                                            + + + + + +
                                                                                            + +
                                                                                            + +
                                                                                            +
                                                                                            + + Select an owner + + + + + + Loading + + + +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            + Skip to content + + + + + + + + +
                                                                                            +
                                                                                            + + + + + + +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            + + + +
                                                                                            +
                                                                                            + +
                                                                                            + +
                                                                                            +

                                                                                              Unrefined

                                                                                               (6 / 999)
                                                                                              Estimate: 0
                                                                                                Click a value to filter the view
                                                                                                  Click a value to filter the view
                                                                                                    Click a value to filter the view
                                                                                                      Click a value to filter the view
                                                                                                        Click a value to filter the view
                                                                                                          Click a value to filter the view

                                                                                                          1.0 Backlog

                                                                                                           (6)
                                                                                                          Estimate: 0
                                                                                                          gitcasso #52

                                                                                                          color nitpicks

                                                                                                            Click a value to filter the view
                                                                                                            gitcasso #55

                                                                                                            make corpus:view less gappy

                                                                                                              Click a value to filter the view
                                                                                                                Click a value to filter the view
                                                                                                                gitcasso #30

                                                                                                                Snapshots for Reddit, GitLab, etc.

                                                                                                                  Click a value to filter the view
                                                                                                                  gitcasso #57

                                                                                                                  what about drafts?

                                                                                                                    Click a value to filter the view
                                                                                                                    Draft

                                                                                                                    make another draft

                                                                                                                      Click a value to filter the view

                                                                                                                      0.1 Backlog

                                                                                                                       (0)
                                                                                                                      Estimate: 0

                                                                                                                      In Progress

                                                                                                                       (2 / 5)
                                                                                                                      Estimate: 0
                                                                                                                      This is actively being worked on

                                                                                                                      In PR

                                                                                                                       (1)
                                                                                                                      Estimate: 0

                                                                                                                      Done

                                                                                                                       (25)
                                                                                                                      Estimate: 0
                                                                                                                      This has been completed
                                                                                                                      + + + + +
                                                                                                                        +
                                                                                                                        + + + + + + + +
                                                                                                                        +
                                                                                                                        what about drafts? · Gitcasso
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        \ No newline at end of file diff --git a/browser-extension/tests/corpus/gh_project_issue_edit.html b/browser-extension/tests/corpus/gh_project_issue_edit.html new file mode 100644 index 0000000..062d767 --- /dev/null +++ b/browser-extension/tests/corpus/gh_project_issue_edit.html @@ -0,0 +1,1519 @@ + + + + + + + + + + + + +what about drafts? · Gitcasso + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        + + + + + +
                                                                                                                        + +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        + + Select an owner + + + + + + Loading + + + +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        + Skip to content + + + + + + + + +
                                                                                                                        +
                                                                                                                        + + + + + + +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        + + + +
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        + +
                                                                                                                        +

                                                                                                                          Unrefined

                                                                                                                           (6 / 999)
                                                                                                                          Estimate: 0
                                                                                                                            Click a value to filter the view
                                                                                                                              Click a value to filter the view
                                                                                                                                Click a value to filter the view
                                                                                                                                  Click a value to filter the view
                                                                                                                                    Click a value to filter the view
                                                                                                                                      Click a value to filter the view

                                                                                                                                      1.0 Backlog

                                                                                                                                       (6)
                                                                                                                                      Estimate: 0
                                                                                                                                      gitcasso #52

                                                                                                                                      color nitpicks

                                                                                                                                        Click a value to filter the view
                                                                                                                                        gitcasso #55

                                                                                                                                        make corpus:view less gappy

                                                                                                                                          Click a value to filter the view
                                                                                                                                            Click a value to filter the view
                                                                                                                                            gitcasso #30

                                                                                                                                            Snapshots for Reddit, GitLab, etc.

                                                                                                                                              Click a value to filter the view
                                                                                                                                              gitcasso #57

                                                                                                                                              what about drafts?

                                                                                                                                                Click a value to filter the view
                                                                                                                                                Draft

                                                                                                                                                make another draft

                                                                                                                                                  Click a value to filter the view

                                                                                                                                                  0.1 Backlog

                                                                                                                                                   (0)
                                                                                                                                                  Estimate: 0

                                                                                                                                                  In Progress

                                                                                                                                                   (2 / 5)
                                                                                                                                                  Estimate: 0
                                                                                                                                                  This is actively being worked on

                                                                                                                                                  In PR

                                                                                                                                                   (1)
                                                                                                                                                  Estimate: 0

                                                                                                                                                  Done

                                                                                                                                                   (25)
                                                                                                                                                  Estimate: 0
                                                                                                                                                  This has been completed
                                                                                                                                                  + + + + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + +
                                                                                                                                                    +
                                                                                                                                                    what about drafts? · Gitcasso
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    \ No newline at end of file