feat(reply-drafts): Reply Drafts section for prepared replies#70
Open
yustme wants to merge 2 commits into
Open
feat(reply-drafts): Reply Drafts section for prepared replies#70yustme wants to merge 2 commits into
yustme wants to merge 2 commits into
Conversation
Adds a Reply Drafts sidebar section that surfaces the prepared replies Scout writes to drafts/<TAG>.md — one card per open loop where the user owes an answer. Read the full drafted text, Copy it, Open the original thread, then Mark sent / Dismiss. The app NEVER sends and never creates a native draft; it only flips the file's status: field (draft -> sent | dismissed), mirroring the Proposals feature. New module Scout/ReplyDrafts/ (model, channel/status enums, parser, status writer via GuardedFileWrite + git, FSEvents-backed document service, cards). Wired into AppState + MainWindowView + SidebarView. Swift Testing coverage for status/channel parsing, draft parsing, and the status-rewrite writer (pure + end-to-end with git). Contract matches scout-plugin drafts/<TAG>.md.
Adds an 'app' job that produces an unsigned Release Scout.app and uploads it as the Scout-app artifact, so the build (with reply-drafts changes) can be downloaded and run without a local Xcode. Mirrors the step on feat/knowledge-base.
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.
Adds a Reply Drafts sidebar section that surfaces the prepared replies Scout writes to
drafts/<TAG>.md— one card per open loop where you owe someone an answer.Each card shows the recipient, subject, channel + status chips, and the full drafted reply body (selectable). Actions: Copy (body to clipboard), Open thread (the original conversation), Mark sent, Dismiss, and Reopen for resolved drafts.
Hard constraint
The app never sends and never creates a native draft. The only side effect of Mark sent / Dismiss / Reopen is flipping the file’s
status:field (draft → sent | dismissed) — sending stays the user’s action. Mirrors how the Proposals feature flips a status field.Implementation
New module
Scout/ReplyDrafts/, modelled onScout/Proposals/:ReplyDraft,DraftStatus(draft|sent|dismissed),DraftChannel(email|slack|linear|github|whatsapp).ReplyDraftsParser(frontmatter + body),ReplyDraftsWriter(status rewrite viaGuardedFileWrite+ scoped git commit),ReplyDraftsDocumentService(FSEvents-backed, pending-count badge).RepliesView,ReplyDraftCardView,DraftStatusPill,ChannelBadge.AppState(service + writer box, loaded at launch, badge reactivity),MainWindowView(SidebarItem.replyDrafts+ detail route),SidebarView(badge row). New files land in the file-system-synchronizedScout/ScoutTestsgroups, so noproject.pbxprojedits.Contract
The
drafts/<TAG>.mdfrontmatter (tag, channel, loop_type, to, thread_ref, subject, status, created, context_answer_ref) matches what scout-plugin writes. The app writes back only the canonical lowercasestatus:word so a re-read by Scout round-trips.Tests
Swift Testing suites for status/channel parsing, draft parsing (incl. README-without-frontmatter skipped, chat channels omitting subject, promise-answered context ref), and the writer (pure status rewrite + end-to-end with git commit scoped to
drafts/<tag>.md). Full build +xcodebuild testrun on CI.Companion
Paired with the scout-plugin PR (Raven-Scout/scout-plugin#175) that detects the loops and writes these draft files.