Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
try {
saveError = null;
const title = `${actionName} log`;
await createNote(branchId, title, content);
await createNote(branchId, title, '```\n' + content + '\n```');

Choose a reason for hiding this comment

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

P2 Badge Escape fenced log output before wrapping it in markdown

If an action log already contains ``````, wrapping the whole payload in another triple-fenced block here produces malformed markdown. NoteModal.svelte renders notes with `marked`, so the first embedded fence closes the wrapper early and the remainder of the saved log is rendered as normal markdown instead of preserved verbatim. This is easy to hit with AI/CLI output that already includes fenced snippets, so some saved logs will open with truncated or reformatted content.

Useful? React with 👍 / 👎.

invalidateBranchTimeline(branchId);
onNoteCreated?.();
saveState = 'saved';
Expand Down
3 changes: 3 additions & 0 deletions apps/staged/src/lib/features/branches/BranchCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@
if (latest.kind === 'note' && latest.title.toLowerCase().includes('plan')) {
return 'Implement plan';
}
if (latest.kind === 'note' && latest.title.toLowerCase().endsWith(' log')) {
Comment on lines 152 to +155

Choose a reason for hiding this comment

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

P2 Badge Match log-note titles before the broader plan heuristic

Because action names are user-defined, a saved log note can legitimately be titled something like Migration Plan log. In that case the earlier includes('plan') branch wins, so the new log-note prefill never runs and commit sessions are prefilled with Implement plan instead of the log-analysis prompt. This makes the added behavior fail for any action name containing “plan”.

Useful? React with 👍 / 👎.

return 'Read the latest note which contains logs. Look for any issues.';
}

return '';
});
Expand Down