Skip to content

feat(ui): improve log note saving and commit prefill for log notes#407

Merged
matt2e merged 3 commits intomainfrom
log-note-improvements
Mar 18, 2026
Merged

feat(ui): improve log note saving and commit prefill for log notes#407
matt2e merged 3 commits intomainfrom
log-note-improvements

Conversation

@matt2e
Copy link
Contributor

@matt2e matt2e commented Mar 18, 2026

Summary

  • Wrap log note content in markdown code fences when saving from the action output modal
  • Add case-insensitive title matching for log notes
  • Add a commit prefill message for log notes that prompts reading and analyzing the latest logs

Test plan

  • Save a log note from the action output modal and verify content is wrapped in code fences
  • Verify log note title matching is case-insensitive
  • Verify branches with a latest log note get the correct commit prefill message

🤖 Generated with Claude Code

matt2e and others added 3 commits March 18, 2026 11:24
Wrap command output in code blocks when saving as a note, and prefill
the new commit dialog with "Look for issues in the logs in the latest
note" when the last timeline item is a note ending with " log".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use .toLowerCase().endsWith() for consistency with the existing plan
title check above.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change the prefill to "Read the latest note which contains logs. Look
for any issues." for clearer intent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners March 18, 2026 01:30
Copy link

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

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: 914ca9cf4b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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 👍 / 👎.

Comment on lines 152 to +155
if (latest.kind === 'note' && latest.title.toLowerCase().includes('plan')) {
return 'Implement plan';
}
if (latest.kind === 'note' && latest.title.toLowerCase().endsWith(' log')) {

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 👍 / 👎.

@matt2e matt2e merged commit 7d41ebc into main Mar 18, 2026
4 checks passed
@matt2e matt2e deleted the log-note-improvements branch March 18, 2026 01:49
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