Skip to content

Fix save retry loop, punctuation CSS typo, and missing EOF newlines#474

Merged
makermelissa merged 1 commit intocircuitpython:betafrom
makermelissa-piclaw:fix/beta-review-fixes
Apr 23, 2026
Merged

Fix save retry loop, punctuation CSS typo, and missing EOF newlines#474
makermelissa merged 1 commit intocircuitpython:betafrom
makermelissa-piclaw:fix/beta-review-fixes

Conversation

@makermelissa-piclaw
Copy link
Copy Markdown
Contributor

Fixes three issues spotted during review of #473:

1. Bug — Save retry fires immediately instead of after 2s delay

setTimeout(await saveFileContents(path), 2000) calls the function immediately (and awaits it), then passes the resolved return value to setTimeout. This creates a tight retry loop instead of a 2-second backoff.

Fix: Wrap in an arrow function so setTimeout defers the call:

setTimeout(() => saveFileContents(path), 2000)

2. Minor — CSS variable typo in _themes.scss

--puctuation-color--punctuation-color (missing 'n') in both dark and light theme roots and the .tok-punctuation rule.

3. Nit — Missing trailing newlines

Added missing final newlines to js/layout.js, sass/base/_base.scss, and js/common/dialogs.js.

- Fix setTimeout in saveFileContents retry to use arrow function instead
  of immediately invoking the function (caused tight retry loop)
- Fix --puctuation-color typo to --punctuation-color in _themes.scss
- Add missing trailing newlines to layout.js, _base.scss, dialogs.js
Copy link
Copy Markdown
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

Thank you

@makermelissa makermelissa merged commit b58df41 into circuitpython:beta Apr 23, 2026
1 check passed
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