Print: keep From the Vault whole; escape build cache + DB from iCloud
4db06dbc5960d30533945751ee82fa8fff2bc057
humdrum-tiv <45084903+humdrum-tiv@users.noreply.github.com> · 2026-06-08 14:03
parent a3196f99
Print: keep From the Vault whole; escape build cache + DB from iCloud - /print: short sections (From the Vault) get break-inside:avoid so they stay in one column instead of splitting; long sections still flow column-to-column - Redirect .next/data/editions to *.nosync dirs via symlink so iCloud (which syncs ~/Documents) stops evicting the churning build cache and corrupting the open SQLite DB — this was causing build hangs, missing modules, and 500s - launch.command sets up those symlinks on launch (durable across rebuilds) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4 files changed
.gitignore +6 −0
@@ -22,3 +22,9 @@
# build cache / local
tsconfig.tsbuildinfo
.claude/scheduled_tasks.lock
+
+# iCloud-excluded local artifacts (symlinked from .next/data/editions)
+*.nosync
+/.next
+/data
+/editions
app/globals.css +3 −0
@@ -205,6 +205,9 @@ /* Sections flow and balance across columns/pages instead of jumping whole —
that's what left big empty gaps. Headings stay glued to their first lines,
and individual items never split mid-entry. */
.paper-section { margin-bottom: var(--space-5); }
+/* Short sections (e.g. From the Vault) stay intact in a single column instead
+ of splitting; long sections still flow column-to-column. */
+.paper-section--whole { break-inside: avoid; }
.paper-section > h2 {
font-family: var(--font-display);
font-size: 20px;
app/print/page.tsx +6 −1
@@ -225,11 +225,16 @@ return null;
}
}
+// Short trailing/list sections that look broken when split mid-section across
+// columns. Long sections (headlines, on this day) still flow column-to-column.
+const KEEP_WHOLE: Partial<Record<SourceKind, true>> = { obsidian: true };
+
function PaperSection({ section }: { section: EditionSection }) {
const body = SectionBody({ kind: section.kind, payload: section.payload });
if (!body) return null;
+ const cls = KEEP_WHOLE[section.kind] ? "paper-section paper-section--whole" : "paper-section";
return (
- <section className="paper-section">
+ <section className={cls}>
<h2>{SECTION_TITLE[section.kind] ?? section.label}</h2>
{body}
</section>
scripts/launch.command +12 −0
@@ -19,6 +19,18 @@ cd "$REPO"
echo "Personal Dashboard → $REPO"
+# This repo lives under ~/Documents, which iCloud syncs. iCloud churns and
+# evicts the rapidly-rewritten build cache (.next) and can corrupt the open
+# SQLite DB. Redirect those local artifacts to *.nosync dirs (iCloud ignores
+# any path ending in .nosync) via symlinks, so the paths stay the same.
+for d in .next data editions; do
+ if [ ! -L "$d" ]; then
+ [ -d "$d" ] && mv "$d" "$d.nosync" # preserve existing contents (e.g. the DB)
+ mkdir -p "$d.nosync"
+ ln -snf "$d.nosync" "$d"
+ fi
+done
+
# Already running? Just open it.
if curl -sf "${URL}/api/health" >/dev/null 2>&1; then
echo "Already running. Opening $URL"