From c18962e359bb4ab0656867020a0550437dccfc88 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 6 May 2026 01:05:04 +0000 Subject: [PATCH 1/2] Fix print sizing to fill full page, add virtue label under title Print/PDF output was constrained to max-width 650px with 40px padding, causing stories to print at ~6x5 on 8.5x11 paper. Now uses @page rules with proper margins (0.75in/1in) and full-width body so content fills the page naturally. Also adds virtue name badge and description under the story title in both the on-screen display and print output so readers know what virtue the story is practicing. https://claude.ai/code/session_01JTtoDiSYiPrcPrnACCB7wP --- components/app/StoryForge.tsx | 73 ++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/components/app/StoryForge.tsx b/components/app/StoryForge.tsx index d4b392d..634179d 100644 --- a/components/app/StoryForge.tsx +++ b/components/app/StoryForge.tsx @@ -76,6 +76,7 @@ export default function StoryForge({ discussionQuestions: string[]; familyActivity: string; virtueTag: string; + virtueDetail: string; } | null>(null); const [error, setError] = useState(null); const [copied, setCopied] = useState(false); @@ -231,6 +232,7 @@ ACTIVITY: [A simple, fun family activity (5-10 minutes) that practices the virtu setStory({ title, body, discussionQuestions, familyActivity, virtueTag: resolved.map((r) => r.sv.name).join(" \u00B7 "), + virtueDetail: resolved.map((r) => `${r.sv.name} (${r.pv.name}) \u2014 ${r.sv.desc}`).join(" \u00B7 "), }); incrementStoryCount(); trackEvent("story_generated"); @@ -256,37 +258,53 @@ ACTIVITY: [A simple, fun family activity (5-10 minutes) that practices the virtu const buildStoryHTML = () => { if (!story) return ""; const displayName = draftName.trim() || "a young reader"; - return `${story.title} + return `${story.title}
\uD83D\uDCC4 To save as PDF: Tap the Share button (square with arrow) then choose "Print" or "Save to Files". On desktop, choose "Save as PDF" in the print dialog.

${story.title}

+ ${story.virtueTag ? `
${story.virtueTag}
` : ""} + ${story.virtueDetail ? `
${story.virtueDetail}
` : ""}
A story for ${displayName} \u00B7 Generated by Bedtime Virtues
- ${story.body.split("\n\n").map((p: string) => `

${p}

`).join("")} +
+ ${story.body.split("\n\n").map((p: string) => `

${p}

`).join("")} +
${story.discussionQuestions.length > 0 ? ` -
-

Discussion Guide

- ${story.virtueTag ? `
${story.virtueTag}
` : ""} +
+

Discussion Guide

    - ${story.discussionQuestions.map((q: string) => `
  1. ${q}
  2. `).join("")} + ${story.discussionQuestions.map((q: string) => `
  3. ${q}
  4. `).join("")}
- ${story.familyActivity ? `
- Family Activity: -

${story.familyActivity}

+ ${story.familyActivity ? `
+ Family Activity: +

${story.familyActivity}

` : ""}
` : ""} @@ -646,6 +664,25 @@ ACTIVITY: [A simple, fun family activity (5-10 minutes) that practices the virtu }}> {story.title} + {story.virtueTag && ( +
+ + {story.virtueTag} + +
+ )} + {story.virtueDetail && ( +
+ {story.virtueDetail} +
+ )}
Date: Thu, 7 May 2026 13:12:25 +0000 Subject: [PATCH 2/2] Add GitHub Action to auto-merge claude/ branches into main When Claude Code pushes to a claude/ branch, this workflow automatically creates a PR and merges it into main, so changes deploy to Vercel without manual merging. https://claude.ai/code/session_01JTtoDiSYiPrcPrnACCB7wP --- .github/workflows/auto-merge-claude.yml | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/auto-merge-claude.yml diff --git a/.github/workflows/auto-merge-claude.yml b/.github/workflows/auto-merge-claude.yml new file mode 100644 index 0000000..fb6b253 --- /dev/null +++ b/.github/workflows/auto-merge-claude.yml @@ -0,0 +1,43 @@ +name: Auto-merge Claude branches + +on: + push: + branches: + - 'claude/**' + +permissions: + contents: write + pull-requests: write + +jobs: + auto-merge: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Create and merge PR + env: + GH_TOKEN: ${{ github.token }} + run: | + BRANCH="${GITHUB_REF#refs/heads/}" + echo "Auto-merging $BRANCH into main" + + # Create PR + PR_URL=$(gh pr create \ + --base main \ + --head "$BRANCH" \ + --title "Auto-merge: $(git log -1 --pretty=%s)" \ + --body "Automatically created from \`$BRANCH\`." \ + 2>/dev/null || true) + + # If PR already exists, get its number + PR_NUM=$(gh pr list --head "$BRANCH" --json number --jq '.[0].number') + + if [ -n "$PR_NUM" ]; then + gh pr merge "$PR_NUM" --merge --auto --delete-branch + echo "Merged PR #$PR_NUM" + else + echo "No PR to merge" + fi