Skip to content
Merged
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
2 changes: 1 addition & 1 deletion app/components/Noodle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const ACTIVE_NOODLES: Noodle[] = [
key: 'gif-day',
logo: NoodleGifDayLogo,
date: '2026-09-05',
dateTo: '2026-09-05',
dateTo: '2026-09-08',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | rg '(^|/)Noodle/index\.ts$|(^|/)IntroHeader\.vue$|(^|/)package\.json$' || true

echo "== Noodle outline =="
ast-grep outline app/components/Noodle/index.ts --view compact || true

echo "== Noodle relevant section =="
sed -n '1,130p' app/components/Noodle/index.ts 2>/dev/null || true

echo "== IntroHeader relevant sections =="
rg -n "date|dateTo|today|gif|GIF|Gif" app/components/Landing/IntroHeader.vue -C 3 || true

echo "== imports/usages of Noodle date props =="
rg -n "Noodle|date:|dateTo:" app -C 2 || true

echo "== git diff stat/name =="
git diff --stat HEAD~1..HEAD 2>/dev/null || git diff --stat 2>/dev/null || true
git diff -- app/components/Noodle/index.ts 2>/dev/null | sed -n '1,160p' || true

Repository: npmx-dev/npmx.dev

Length of output: 40415


🏁 Script executed:

#!/bin/bash
set -euo pipefail

node - <<'JS'
function calendarDays(startDate, endDate) {
  const start = Date.UTC(Number(startDate.split('-')[0]), Number(startDate.split('-')[1]) - 1, Number(startDate.split('-')[2]))
  const end = Date.UTC(Number(endDate.split('-')[0]), Number(endDate.split('-')[1]) - 1, Number(endDate.split('-')[2]))
  if (end < start) throw new Error('end before start')
  return Math.abs(Math.round((end - start) / 86400000)) + 1
}

const cases = [
  { date: '2026-09-05', dateTo: '2026-09-08' },
  { date: '2026-09-05', dateTo: undefined },
  { date: '2026-07-17', dateTo: '2026-07-19' },
  { date: '2026-06-06', dateTo: '2026-06-08' },
  { date: '2026-09-05', dateTo: '2026-09-07' },
]

for (const { date, dateTo } of cases) {
  const currentActive = date && dateTo
    ? function todayMatches(date, dateTo) {
        return function today(today) {
          return today >= date && today <= dateTo
        }
      }(date, dateTo)
    : undefined
  console.log(JSON.stringify({
    date,
    dateTo,
    calendarDays: dateTo ? calendarDays(date, dateTo) : null,
    includedDays: currentActive
      ? ['2026-09-04','2026-09-05','2026-09-06','2026-09-07','2026-09-08','2026-09-09']
          .filter(todayActive => currentActive(todayActive))
      : undefined,
  }))
}
JS

Repository: npmx-dev/npmx.dev

Length of output: 602


Keep the GIF Day range to three days

IntroHeader.vue compares today with both date and dateTo inclusively. With date: '2026-09-05', setting dateTo: '2026-09-08' makes the noodle active on 5, 6, 7 and 8 September. Change it to 2026-09-07 unless the extended fourth day is intentional.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/components/Noodle/index.ts` at line 80, Update the Noodle GIF
configuration’s dateTo value from 2026-09-08 to 2026-09-07 so the inclusive
range covers only September 5–7; keep the existing date value unchanged.

timezone: 'auto',
},
]
Expand Down
Loading