Add Markdown document templates#1283
Open
colinchambachan wants to merge 1 commit intostablyai:mainfrom
Open
Conversation
5a0309f to
700cc91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{{title}},{{filename}},{{date}},{{time}}, and{{datetime}}.Insert Templatemenu for Markdown edit tabs; templates append to existing content instead of replacing it.Closes #1222
Screenshots / Recording
Screen.Recording.2026-04-30.at.8.50.42.AM.mov
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildNote: local build exits 0 but prints the existing
/usr/local/bin/orca-devsymlink permission warning.AI Code Review Summary
I reviewed this change for scope, cross-platform behavior, and security-sensitive paths. The implementation keeps templates in app settings and inserts rendered Markdown through the existing editor draft/save path, so it does not introduce new filesystem write IPC or alternate document-creation behavior.
Cross-platform check: no new keyboard shortcuts were added. Placeholder dates use local
Datefields instead oftoISOString(), avoiding timezone shifts. Filename/title extraction normalizes path separators for display/template variables only and does not introduce security-sensitive path handling.Security audit: template content is user-authored Markdown inserted into the user's current document. Unknown placeholders are preserved rather than evaluated. Persisted template data is normalized on load/update so malformed stored values do not leak into renderer state. No new file overwrite path, absolute path construction path, or traversal-sensitive IPC was added.
Platform Notes
Tested locally on macOS with Node v22.22.2. Orca targets macOS, Linux, and Windows; this change avoids platform-specific shortcuts and filesystem assumptions.
Follow-ups Intentionally Out of Scope