From 2da9461b44f868b3e98fb5ac627c1478ef2fef4b Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Tue, 5 May 2026 14:45:26 +0300 Subject: [PATCH] fix(hg): show clone errors, stable cwd; shrink timeline fonts Remove /dev/null redirects in hg-ingest.sh so errors are visible. cd to work dir before loop to prevent getcwd failures after rm. Use $HOME instead of ~ for proper expansion in default values. Reduce timeline entry title, subtitle, and body font sizes for a more compact activity feed. Co-Authored-By: Claude Opus 4.6 (1M context) --- script/hg-ingest.sh | 11 +++++------ ui/src/App.css | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/script/hg-ingest.sh b/script/hg-ingest.sh index f4464e6..55e68f5 100755 --- a/script/hg-ingest.sh +++ b/script/hg-ingest.sh @@ -15,11 +15,10 @@ set -euo pipefail DATABASE_URL="${DATABASE_URL:-postgres://moments_rw@magrathea.kosherinata.internal:5432/moments?sslmode=verify-full&sslrootcert=/etc/pki/ca-trust/source/anchors/root-internal.pem&sslcert=/etc/pki/tls/misc/$(hostname -f).pem&sslkey=/etc/pki/tls/private/$(hostname -f).pem}" HG_HOST="${HG_HOST:-hg-edge.mozilla.org}" -WORK_DIR="${HG_WORK_DIR:-~/hg}" +WORK_DIR="${HG_WORK_DIR:-$HOME/hg}" # Repos to clone (groups are expanded inline) REPOS=( - mozilla-central integration/mozilla-inbound integration/autoland integration/fx-team @@ -56,6 +55,7 @@ total=0 CLONE_DIR="$WORK_DIR/clone" CACHE_DIR="$WORK_DIR/cache" mkdir -p "$CACHE_DIR" +cd "$WORK_DIR" for repo in "${REPOS[@]}"; do cache_file="$CACHE_DIR/$(echo "$repo" | tr '/' '_').tsv" @@ -68,7 +68,7 @@ for repo in "${REPOS[@]}"; do rm -rf "$CLONE_DIR" echo "[hg-ingest] cloning $repo" - if ! hg clone --noupdate "https://$HG_HOST/$repo" "$CLONE_DIR" 2>/dev/null; then + if ! hg clone --noupdate "https://$HG_HOST/$repo" "$CLONE_DIR"; then echo "[hg-ingest] clone failed: $repo (skipping)" continue fi @@ -86,7 +86,7 @@ for repo in "${REPOS[@]}"; do # Extract matching changesets to cache file hg log -R "$CLONE_DIR" -r "$revset" \ --template '{node}\t{author}\t{date|hgdate}\t{desc|firstline}\n' \ - > "$cache_file" 2>/dev/null || true + > "$cache_file" || true # Free disk immediately rm -rf "$CLONE_DIR" @@ -101,8 +101,7 @@ for repo in "${REPOS[@]}"; do date_ts="${date_raw%% *}" # Build ISO timestamp from unix epoch - occurred_at=$(date -u -d "@${date_ts}" '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || \ - date -u -r "${date_ts}" '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null) + occurred_at=$(date -u -d "@${date_ts}" '+%Y-%m-%dT%H:%M:%SZ') event_id="hg:${repo}:${node}" diff --git a/ui/src/App.css b/ui/src/App.css index 6eeab1e..63e6c01 100644 --- a/ui/src/App.css +++ b/ui/src/App.css @@ -34,6 +34,21 @@ a.hot-pink { color: #2c3e50; } +.vertical-timeline-element-content h4.vertical-timeline-element-title { + font-size: 0.85rem; +} + +.vertical-timeline-element-content h5.vertical-timeline-element-subtitle { + font-size: 0.75rem; +} + +.vertical-timeline-element-content p, +.vertical-timeline-element-content ul, +.vertical-timeline-element-content li, +.vertical-timeline-element-content code { + font-size: 0.75rem; +} + .vertical-timeline-element-content a { color: #1565c0; }