Skip to content

Feature release - #100

Merged
johannrichard merged 24 commits into
masterfrom
beta
Jul 12, 2026
Merged

Feature release#100
johannrichard merged 24 commits into
masterfrom
beta

Conversation

@johannrichard

@johannrichard johannrichard commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

update beta

Summary by CodeRabbit

  • Bug Fixes
    • Improved frontmatter generation: when frontmatter management is disabled, a default/empty frontmatter block is no longer output.
    • Fixed Library folder name updates: clearing the field now restores the default name and applies the change.
    • Settings application now correctly synchronizes current settings before saving/applying.
    • Improved the reset-last-updated debug command’s status messaging in the status bar.

TyceHerrman and others added 4 commits March 19, 2026 17:34
When users enable atomic highlights but don't add atomize blocks to their
highlight template, the plugin silently creates an empty Highlight/ folder.
This adds warnings in both settings UI and at sync time, updates the default
highlight template to include atomize blocks for new users, and hardens the
atomizer against non-string basename values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…to 2.4.1-beta.1 [skip ci]

## [2.4.1-beta.1](2.4.0...2.4.1-beta.1) (2026-06-16)

### Bug Fixes

* 🐛 always register settings tab even if initialization fails ([87ca7a6](87ca7a6))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.1-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The release metadata now targets 2.4.2-beta.4, release automation adds post-release git and attestation steps, frontmatter handling returns empty output when disabled or blank, settings application order changes, and the reset-last-updated command updates the status bar text.

Changes

Release automation and runtime behavior updates

Layer / File(s) Summary
Release metadata and workflow
manifest.json, package.json, .releaserc.yaml, .github/workflows/release.yml
Version fields change to 2.4.2-beta.4; the commented semantic-release git block is removed; the release workflow adds conditional git config, manifest commit, and artifact attestation steps.
Frontmatter base rendering
src/constants.ts, src/services/frontmatter-manager.ts
EMPTY_FRONTMATTER is removed; getBaseFrontmatter() now returns empty frontmatter when disabled or when the rendered template is blank.
Settings sync and UI order
src/main.ts
ctx.settings is copied onto the instance before saving, and settings loading now completes before the settings tab is added.
Settings input and command feedback
src/ui/settings-tab.ts, src/utils/plugin-commands.ts
Empty library folder input now falls back to the default base folder name, and the reset-last-updated command now updates the status bar with formatted text.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hopped through releases, bright and new,
Version beetle-bumped to beta blue.
Frontmatter hushes when blank or small,
Settings and status now answer the call.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too generic and doesn't describe the actual changes, such as the beta version bump and release workflow updates. Use a concise, specific title like 'Bump beta release version and update release workflow'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch beta

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@manifest.json`:
- Around line 4-5: The manifest.json file contains a duplicate version key where
both "2.4.1-beta.1" and "2.4.1" are specified, causing ambiguity in parsing.
Remove the duplicate version entry (the "2.4.1" line) and keep only the beta
version ("2.4.1-beta.1") to ensure the manifest is unambiguous and the correct
version is used regardless of parsing order.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d196ef3c-cbf1-46a5-81a8-1b5738fd6cac

📥 Commits

Reviewing files that changed from the base of the PR and between e679f43 and 93acde3.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • manifest.json
  • package.json

Comment thread manifest.json Outdated
johannrichard and others added 2 commits June 16, 2026 20:28
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…to 2.4.2-beta.1 [skip ci]

## [2.4.2-beta.1](2.4.1...2.4.2-beta.1) (2026-06-16)

### Bug Fixes

* update manifest.json ([8cb402a](8cb402a))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

johannrichard and others added 2 commits June 19, 2026 19:08
frontmatter is "empty" under certain conditions and triggers a yaml parser error. this fixes it.

FIXES: #98
…to 2.4.2-beta.2 [skip ci]

## [2.4.2-beta.2](2.4.2-beta.1...2.4.2-beta.2) (2026-06-19)

### Bug Fixes

* 🚑️ fix empty frontmatter regression ([6bc1bcc](6bc1bcc)), closes [#98](#98)
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

johannrichard and others added 3 commits June 21, 2026 21:18
Fix regression with respect to saving settings in the latest beta.

FIXES: #101
If the user clears the folder name, update the settings with the proper "baseFolderName" default
…to 2.4.2-beta.3 [skip ci]

## [2.4.2-beta.3](2.4.2-beta.2...2.4.2-beta.3) (2026-06-21)

### Bug Fixes

* 🐛 fix base folder name reset ([298ef32](298ef32))
* 🚑️ fix settings not being written to disc anymore ([cd74878](cd74878)), closes [#101](#101)
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main.ts`:
- Around line 81-84: In the saveAndApplySettings arrow function, the line that
assigns this.settings = ctx.settings is problematic because ctx is a stale
context reference that was captured before loadAndApplySettings() was invoked,
while this.settings gets reassigned later at line 163 with loaded settings.
Remove the assignment of this.settings from ctx.settings to prevent stale
context values from overwriting the current loaded settings, and simply return
the call to this.saveAndApplySettings() to invoke the actual implementation.

In `@src/ui/settings-tab.ts`:
- Around line 559-561: The validation check for the base folder name in the code
block around the assignment to this.ctx.settings.baseFolderName does not account
for whitespace-only input. Modify the condition that checks if (!value) to first
trim the value string before evaluating it as empty, ensuring that
whitespace-only folder names are also caught and replaced with
DEFAULT_SETTINGS.baseFolderName. This prevents effectively empty folder names
from being persisted to settings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e353cb10-6a36-490f-bbb1-4b36f4b2e86b

📥 Commits

Reviewing files that changed from the base of the PR and between 60ddf92 and d7c930e.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • manifest.json
  • package.json
  • src/main.ts
  • src/ui/settings-tab.ts
✅ Files skipped from review due to trivial changes (1)
  • package.json

Comment thread src/main.ts
Comment thread src/ui/settings-tab.ts Outdated
johannrichard and others added 3 commits June 21, 2026 21:35
Ensure last synced date is properly displayed when `reset-last-updated` is called
…to 2.4.2-beta.4 [skip ci]

## [2.4.2-beta.4](2.4.2-beta.3...2.4.2-beta.4) (2026-06-21)

### Bug Fixes

* 🩹 improve load sequence to avoid stale context ([4d2ad03](4d2ad03))
* 🩹 update synced date on `reset-last-updated` ([75a5595](75a5595))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

TyceHerrman and others added 2 commits June 26, 2026 10:14
…ocks-missing

# Conflicts:
#	package-lock.json
#	package.json
Replace branch-specific semantic-release extends logic with a simpler post-release workflow step.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

♻️ Duplicate comments (1)
src/main.ts (1)

81-84: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Avoid copying a stale ctx.settings object back onto the plugin.

Line 82 can still clobber freshly loaded settings. ReadwiseMirrorSettingTab keeps a long-lived PluginContext, while loadAndApplySettings() later replaces this.settings with a new object at Line 163. After that happens, saving from the tab can write the old snapshot back to disk and lose newer fields like lastUpdated.

Suggested fix
       saveAndApplySettings: () => {
-        this.settings = ctx.settings;
         return this.saveAndApplySettings();
       },
// Keep the object identity stable when reloading settings.
Object.assign(this.settings, DEFAULT_SETTINGS, loaded ?? {});
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main.ts` around lines 81 - 84, The save path in saveAndApplySettings is
overwriting the plugin with the long-lived ctx.settings snapshot, which can
clobber newer fields after loadAndApplySettings replaces this.settings. Update
the reloading logic in loadAndApplySettings to preserve object identity by
merging into the existing settings object instead of assigning a new one, and
keep ReadwiseMirrorSettingTab/saveAndApplySettings using the current plugin
state rather than copying ctx.settings back.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

44-45: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Avoid direct GitHub expression interpolation inside shell.

Zizmor flags these expansions. Pass the actor through env and reference shell variables instead.

Proposed fix
       - name: Configure Git
         if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+        env:
+          GIT_ACTOR: ${{ github.actor }}
         run: |
-          git config --global user.name "${{ github.actor }}"
-          git config --global user.email "${{ github.actor }}`@users.noreply.github.com`"
+          git config --global user.name "$GIT_ACTOR"
+          git config --global user.email "$GIT_ACTOR@users.noreply.github.com"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 44 - 45, The release workflow is
interpolating GitHub expressions directly inside shell commands, which should be
avoided. Update the release job to pass github.actor through env and then use
the shell variable in the git config commands instead of inline expression
expansion. Look for the git config setup in the release workflow and adjust
those steps to reference the environment variable consistently.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 61-63: The release workflow is attesting the wrong artifact paths
in the subject-path list. Update the release attestation entry to match the
actual outputs referenced by rollup.config.mjs and .releaserc.yaml, using the
repository-root main.js plus manifest.json and src/ui/styles/styles.css instead
of build/main.js and build/styles.css. Keep the change localized to the release
job configuration so the attested files match what is actually published.
- Around line 34-40: The release workflow currently lets the audit step fail
open because of continue-on-error in the job before Build plugin and
semantic-release, which can allow high-risk audit or signature failures to still
publish. Remove continue-on-error from that audit-related step in the release
flow, or split the report-only audit into a separate non-release job so
semantic-release only runs after blocking checks pass.
- Around line 42-58: The release workflow is still gated on refs/heads/main, so
the Git config, manifest commit, and artifact attestation steps will not run
after merging into master. Update the if condition on the relevant steps in
release.yml to use refs/heads/master consistently, keeping the existing
github.event_name == 'push' check. Use the step names "Commit manifest.json
(main only)" and "Generate artifact attestation (main release)" as anchors when
updating the condition.
- Around line 57-59: The main release attestation step using actions/attest@v4
is missing required write permissions. Update the workflow permissions for the
release job so the attestation step has both attestations: write and
artifact-metadata: write, then verify the Generate artifact attestation (main
release) step can run successfully under the existing github.event_name and
github.ref condition.
- Line 59: The workflow step using actions/attest is still referenced by a
mutable tag, which violates the unpinned-action policy. Update the uses entry in
the release workflow to the resolved commit SHA for actions/attest instead of
v4, keeping the same step intact and only changing the action reference.

---

Duplicate comments:
In `@src/main.ts`:
- Around line 81-84: The save path in saveAndApplySettings is overwriting the
plugin with the long-lived ctx.settings snapshot, which can clobber newer fields
after loadAndApplySettings replaces this.settings. Update the reloading logic in
loadAndApplySettings to preserve object identity by merging into the existing
settings object instead of assigning a new one, and keep
ReadwiseMirrorSettingTab/saveAndApplySettings using the current plugin state
rather than copying ctx.settings back.

---

Nitpick comments:
In @.github/workflows/release.yml:
- Around line 44-45: The release workflow is interpolating GitHub expressions
directly inside shell commands, which should be avoided. Update the release job
to pass github.actor through env and then use the shell variable in the git
config commands instead of inline expression expansion. Look for the git config
setup in the release workflow and adjust those steps to reference the
environment variable consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8b009baf-03a6-4390-8bcf-6c0c60567d20

📥 Commits

Reviewing files that changed from the base of the PR and between d7c930e and cdff162.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • .github/workflows/release.yml
  • .releaserc.yaml
  • manifest.json
  • package.json
  • src/main.ts
  • src/utils/plugin-commands.ts
💤 Files with no reviewable changes (1)
  • .releaserc.yaml
✅ Files skipped from review due to trivial changes (3)
  • manifest.json
  • package.json
  • src/utils/plugin-commands.ts

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml Outdated
Comment on lines +57 to +59
- name: Generate artifact attestation (main release)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/attest@v4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the workflow around the attestation step
wc -l .github/workflows/release.yml
sed -n '1,120p' .github/workflows/release.yml

# Look for any attestation-related docs or permissions elsewhere in the repo
rg -n "attestations: write|actions/attest@v4|artifact attestation|attestation" .github README.md docs . 2>/dev/null | head -n 200

Repository: jsonMartin/readwise-mirror

Length of output: 2438


🌐 Web query:

GitHub Actions attestation action requires attestations: write permission actions/attest@v4

💡 Result:

To use the actions/attest@v4 action in a GitHub Actions workflow, you must explicitly configure specific permissions for the GITHUB_TOKEN [1][2]. The required permissions are [3][4]: permissions: id-token: write attestations: write artifact-metadata: write Explanation of required permissions: - id-token: write: Necessary for the action to mint the OIDC (OpenID Connect) token, which is required to request a Sigstore signing certificate [3][4]. - attestations: write: Required to persist the generated attestation [3][4][5]. - artifact-metadata: write: Required to create the artifact storage record [3][4]. When you define the permissions block within your job, all unspecified permissions are set to none [5]. Therefore, ensure you include any other permissions your workflow requires (such as contents: read or packages: write) alongside these three [1][2].

Citations:


Grant attestation and artifact-metadata write permissions. actions/attest@v4 also needs artifact-metadata: write alongside attestations: write, or this step can fail.

🧰 Tools
🪛 zizmor (1.26.1)

[error] 59-59: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 57 - 59, The main release
attestation step using actions/attest@v4 is missing required write permissions.
Update the workflow permissions for the release job so the attestation step has
both attestations: write and artifact-metadata: write, then verify the Generate
artifact attestation (main release) step can run successfully under the existing
github.event_name and github.ref condition.

git push
- name: Generate artifact attestation (main release)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/attest@v4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== release workflow excerpt ==\n'
nl -ba .github/workflows/release.yml | sed -n '45,75p'

printf '\n== search for attest and action pinning patterns ==\n'
rg -n "actions/attest@|uses: .*@[v0-9]|uses: .*@[a-f0-9]{40}|pin" .github/workflows -S || true

printf '\n== workflow files overview ==\n'
fd -a -e yml -e yaml .github/workflows || true

Repository: jsonMartin/readwise-mirror

Length of output: 236


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== release workflow excerpt ==\n'
awk 'NR>=45 && NR<=75 { printf "%d:%s\n", NR, $0 }' .github/workflows/release.yml

printf '\n== attest usage ==\n'
rg -n "actions/attest@" .github/workflows || true

printf '\n== pinned action examples ==\n'
rg -n "uses: .*@[a-f0-9]{40}" .github/workflows || true

printf '\n== workflow files ==\n'
find .github/workflows -maxdepth 1 \( -name '*.yml' -o -name '*.yaml' \) -print

Repository: jsonMartin/readwise-mirror

Length of output: 1208


Pin actions/attest to a commit SHA. actions/attest@v4 is still a mutable tag and will trip the unpinned-action policy; replace it with the resolved SHA here.

🧰 Tools
🪛 zizmor (1.26.1)

[error] 59-59: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml at line 59, The workflow step using
actions/attest is still referenced by a mutable tag, which violates the
unpinned-action policy. Update the uses entry in the release workflow to the
resolved commit SHA for actions/attest instead of v4, keeping the same step
intact and only changing the action reference.

Source: Linters/SAST tools

Comment thread .github/workflows/release.yml Outdated
fix: warn when atomize blocks missing from highlight template
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

… persisting [no-ci]

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

…lights for last updated date

make sure we always have a date for created / updated, even if there are no highlights (anymore).
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2-beta.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@johannrichard johannrichard changed the title Merge pull request #99 from jsonMartin/master Feature release Jul 12, 2026
@johannrichard
johannrichard merged commit 0b3f560 into master Jul 12, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants