Skip to content

26Q3.6: Safe rendering and backup validation - #63

Merged
MstfSlm38 merged 5 commits into
26Q3.5from
26Q3.6-maintenance
Nov 17, 2026
Merged

MstfSlm38 merged 5 commits into
26Q3.5from
26Q3.6-maintenance

Conversation

@MstfSlm38

Copy link
Copy Markdown
Collaborator

26Q3.6 — Maintenance & Stability follow-up

This PR completes the consolidated maintenance pass on top of the merged 26Q3.6 release.

Storage and import reliability

  • Treat parsed null values and unexpected non-array storage values as safe fallbacks.
  • Ignore malformed entries when reading saved snippet/category arrays.
  • Validate backup structure in both the Electron main process and renderer before replacing existing snippets.
  • Reject backup files larger than 20 MB and backups containing more than 10,000 snippets.
  • Validate shared snippet payloads before adding them.

Safe rendering

  • Build snippet cards and category navigation with DOM APIs and textContent, rather than interpolating saved titles, IDs, code, category names, or icons into HTML.
  • Build Spotlight search results with DOM APIs so saved snippet titles and categories remain plain text.

Scope

  • No README changes.
  • No docs/release.html changes.
  • No 26Q4 or 27Q1 roadmap work.

JavaScript syntax checks passed for renderer.js, q3-5.js, and main.js. Please review the PR and wait for the GitHub Actions build before merging.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T10:26:28.978528Z 54b67dc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@MstfSlm38
MstfSlm38 merged commit 3504a29 into 26Q3.5 Nov 17, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54b67dccb5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread main.js
Comment on lines +11 to +12
return Array.isArray(data) && data.length <= MAX_BACKUP_SNIPPETS && data.every(snippet =>
snippet && typeof snippet === 'object' && !Array.isArray(snippet) &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep generated backups within the import limits

When a collection exceeds 10,000 snippets or its JSON exceeds 20 MiB, exportCodeSnipData still passes the full localStorage value to export-data, which writes it successfully, but the new import path rejects that backup. This can leave users with a backup CodeSnip reports as successful but cannot restore; enforce the same limits before exporting or allow those backups to be imported.

Useful? React with 👍 / 👎.

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.

1 participant