Skip to content

Conversation

LoganBrinsmead
Copy link
Contributor

Issues

Fixes #2075

Description

The issue seems to be that the lint buttons did not have a 'type' specified, meaning they likely used the default type 'submit'. I believe that somewhere during the render process the 'submit' was triggered and was submitting the reddit comments.

Manually setting the type to 'button' fixes this and the comments no longer submit when interacting with Harper in my tests.

This PR does not yet fix the sentence copying issue although I suspect this may be occurring somewhere in replaceValue function in computeLintBoxes.ts

Demo

How Has This Been Tested?

I tested by repeatedly trying to edit reddit comments. Couldn't get any of them to submit automatically when testing this change, and Harper still seems to function normally in other applications.

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

@elijah-potter
Copy link
Collaborator

This PR does not yet fix the sentence copying issue although I suspect this may be occurring somewhere in replaceValue function in computeLintBoxes.ts

I believe that problem was fixed in #2068. It just hasn't been released yet.

Copy link
Collaborator

@elijah-potter elijah-potter left a comment

Choose a reason for hiding this comment

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

I think your assessment makes sense. I wasn't able to replicate the issue consistently, which makes me think it was some kind of race condition, perhaps between Harper and Reddit's React rendering?

Either way, I think this is good to merge.

@elijah-potter elijah-potter added this pull request to the merge queue Oct 14, 2025
Merged via the queue into Automattic:master with commit 8131d60 Oct 14, 2025
16 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Oct 17, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Automattic/harper/harper-ls](https://github.com/Automattic/harper) | minor | `v0.67.0` -> `v0.68.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>Automattic/harper (Automattic/harper/harper-ls)</summary>

### [`v0.68.0`](https://github.com/Automattic/harper/releases/tag/v0.68.0)

[Compare Source](Automattic/harper@v0.67.0...v0.68.0)

#### What's Changed

- feat(core): rule to condense `miss spell` and friends by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2066](Automattic/harper#2066)
- feat(chrome-ext): enable by default on WordPress pages by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2065](Automattic/harper#2065)
- fix(chrome-ext): duplication test on Reddit by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2068](Automattic/harper#2068)
- build(deps): bump unicode-width from 0.2.1 to 0.2.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2076](Automattic/harper#2076)
- fix(core): detect acronyms in `AnA` by [@&#8203;86xsk](https://github.com/86xsk) in [#&#8203;2072](Automattic/harper#2072)
- 2075 -- Harper Auto-submits Reddit Comments by [@&#8203;LoganBrinsmead](https://github.com/LoganBrinsmead) in [#&#8203;2079](Automattic/harper#2079)
- fix(typst): fix paragraph break spans by [@&#8203;86xsk](https://github.com/86xsk) in [#&#8203;2080](Automattic/harper#2080)
- feat(core): Add various new rules by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2084](Automattic/harper#2084)

#### New Contributors

- [@&#8203;LoganBrinsmead](https://github.com/LoganBrinsmead) made their first contribution in [#&#8203;2079](Automattic/harper#2079)

**Full Changelog**: <Automattic/harper@v0.67.0...v0.68.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNDguNiIsInVwZGF0ZWRJblZlciI6IjQxLjE0OC42IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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.

Harper auto-submits Reddit comments

2 participants