Error alert says nothing changed after a partial update

Open Beginner friendly
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

The alert text is set in runWithFriendlyErrors_ in src/Code.js, and applyStyleToFootnotes_ is the function that can fail partway through. Read how the catch path builds the message, then change the wording so it no longer says nothing was changed. Done means a failure after some footnotes were restyled shows the suggested or an equivalent message. No test is named, so check the failure path by hand in the add-on.

Written by the indexing model from the issue text.

Description

bug good first issue

Summary

When a menu action fails, runWithFriendlyErrors_ shows: "Nothing else was changed. Please try again." If the error happens partway through applyStyleToFootnotes_, the footnotes processed before the failure have already been restyled, so the message can be wrong.

(Errors inside a single paragraph are already caught and counted, so this mainly affects failures outside that loop.)

Suggested fix

Reword the alert so it doesn't promise that nothing changed. For example: "Some footnotes may already have been updated. You can run the command again, or use Edit → Undo to revert."

Relevant code: runWithFriendlyErrors_ in src/Code.js.


Generated by Claude Code

Dominant language
JavaScript
Stars
0
Forks
0
Avg merge
6m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tanman310/footnote-matcher

All issues in Tanman310/footnote-matcher

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.