Scheduled searches with a weekly review of new and rising repositories

A search can now be saved with a schedule (every N hours, daily, or weekly at
a given day and time). An internal scheduler runs it and keeps a snapshot of
the results on a /data volume (JSON files, no new dependency). The new Watch
tab lists the scheduled searches; the review page of each one shows, for any
run of its history, the repositories never seen before and the ones that
gained the most stars since the previous run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
claude BotandClaude Opus 5.5 committed 2026-10-01 16:36:50 +02:00
1 parent 8f4048d046
commit 02b51fed77
16 files changed
+1745 -45

No files matched your search

+137 -1
View File
@@ -23,7 +23,19 @@
<span>Searchgit</span>
</div>
<form id="searchForm" class="search" role="search">
<nav id="views" class="views" data-i18n-aria="viewsAria">
<a href="#" data-view="search">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
<span data-i18n="viewSearch">Search</span>
</a>
<a href="#saved" data-view="saved">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="13" r="8"/><path d="M12 9v4l2.5 2M9 2h6"/></svg>
<span data-i18n="viewSaved">Watch</span>
<span id="newTotal" class="pill" hidden></span>
</a>
</nav>
<form id="searchForm" class="search view-search" role="search">
<svg class="ico" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
<input id="q" type="search" autocomplete="off" spellcheck="false" data-i18n-aria="searchAria" data-i18n-ph="searchPh">
<select id="in" class="chip-select" data-i18n-aria="inAria">
@@ -47,6 +59,7 @@
<div class="progress" aria-hidden="true"></div>
</header>
<div id="viewSearch" class="view">
<section class="filters">
<select id="language" data-i18n-aria="languageAria"><option value="" data-i18n="langAll">All languages</option></select>
<select id="stars" data-i18n-aria="starsAria">
@@ -58,6 +71,7 @@
</select>
<select id="pushed" data-i18n-aria="pushedAria">
<option value="" data-i18n="pushedAll">Any activity</option>
<option value="1w" data-i18n="pushed1w">Pushed &lt; 1 week</option>
<option value="1m" data-i18n="pushed1m">Pushed &lt; 1 month</option>
<option value="6m" data-i18n="pushed6m">Pushed &lt; 6 months</option>
<option value="1y" data-i18n="pushed1y">Pushed &lt; 1 year</option>
@@ -65,7 +79,10 @@
</select>
<select id="created" data-i18n-aria="createdAria">
<option value="" data-i18n="createdAll">Any creation date</option>
<option value="1w" data-i18n="created1w">Created &lt; 1 week</option>
<option value="1m" data-i18n="created1m">Created &lt; 1 month</option>
<option value="3m" data-i18n="created3m">Created &lt; 3 months</option>
<option value="6m" data-i18n="created6m">Created &lt; 6 months</option>
<option value="1y" data-i18n="created1y">Created &lt; 1 year</option>
<option value="5y" data-i18n="created5y">Created &lt; 5 years</option>
</select>
@@ -98,6 +115,10 @@
<option value="updated" data-i18n="sortUpdated">Recently updated</option>
<option value="help-wanted-issues" data-i18n="sortHelp">Help wanted issues</option>
</select>
<button id="saveBtn" class="btn tool" type="button" data-i18n-title="saveBtnTitle">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="13" r="8"/><path d="M12 9v4l2.5 2M9 2h6"/></svg>
<span class="lbl" data-i18n="saveBtn">Schedule</span>
</button>
<button id="exportBtn" class="btn tool" type="button" data-i18n-title="exportTitle">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v12M7 10l5 5 5-5M4 17v3h16v-3"/></svg>
<span class="lbl">CSV</span>
@@ -116,6 +137,70 @@
<p><strong data-i18n="emptyTitle">No matching repositories.</strong></p>
<p class="muted" data-i18n="emptyHint">Loosen a filter or change the search words.</p>
</div>
</div>
<!-- Saved (scheduled) searches -->
<div id="viewSaved" class="view" hidden>
<section class="filters">
<h1 class="view-title" data-i18n="savedTitle">Scheduled searches</h1>
<div class="end">
<span id="savedCount" class="muted small"></span>
<a href="#" class="btn tool">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
<span class="lbl" data-i18n="savedNew">New from a search</span>
</a>
</div>
</section>
<div id="savedError" class="error-banner" hidden></div>
<main id="savedList" class="list"></main>
<div id="savedEmpty" class="empty" hidden>
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="13" r="8"/><path d="M12 9v4l2.5 2M9 2h6"/></svg>
<p><strong data-i18n="savedEmptyTitle">No scheduled search yet.</strong></p>
<p class="muted" data-i18n="savedEmptyHint"></p>
</div>
</div>
<!-- Review of one saved search -->
<div id="viewReview" class="view" hidden>
<section class="filters review-head">
<a href="#saved" class="icon-btn" data-i18n-title="back" data-i18n-aria="back">
<svg viewBox="0 0 24 24"><path d="m15 18-6-6 6-6"/></svg>
</a>
<div class="review-title">
<h1 id="revName" class="view-title"></h1>
<div id="revSched" class="muted small"></div>
</div>
<div class="end">
<select id="runSel" data-i18n-aria="runAria"></select>
<button id="revRunBtn" class="btn tool" type="button" data-i18n-title="runNowTitle">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 4v16l13-8z"/></svg>
<span class="lbl" data-i18n="runNow">Run now</span>
</button>
<button id="revOpenBtn" class="btn tool" type="button" data-i18n-title="openInSearchTitle">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
<span class="lbl" data-i18n="openInSearch">Open in search</span>
</button>
<button id="revEditBtn" class="icon-btn" type="button" data-i18n-title="edit" data-i18n-aria="edit">
<svg viewBox="0 0 24 24"><path d="M4 20h4L19 9l-4-4L4 16zM14 6l4 4"/></svg>
</button>
</div>
</section>
<section class="filters review-bar">
<div id="revMode" class="seg" role="radiogroup" data-i18n-aria="revModeAria">
<button type="button" role="radio" data-mode="new"></button>
<button type="button" role="radio" data-mode="rising"></button>
<button type="button" role="radio" data-mode="all"></button>
</div>
<span id="revInfo" class="muted small"></span>
</section>
<div id="revError" class="error-banner" hidden></div>
<main id="revList" class="list"></main>
<div id="revEmpty" class="empty" hidden>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 3 2.7 5.6 6.1.8-4.5 4.3 1.1 6.1L12 16.9l-5.4 2.9 1.1-6.1-4.5-4.3 6.1-.8z"/></svg>
<p><strong id="revEmptyTitle"></strong></p>
<p id="revEmptyHint" class="muted"></p>
</div>
</div>
<footer class="status">
<span id="conn" class="conn"></span>
@@ -218,6 +303,57 @@
</div>
</dialog>
<!-- Create / edit a scheduled search -->
<dialog id="saveDlg" class="save-dlg" aria-labelledby="saveTitle">
<form id="saveForm" class="dlg" method="dialog">
<header>
<h2 id="saveTitle"></h2>
<button id="closeSave" class="icon-btn" type="button" data-i18n-aria="close">
<svg viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg>
</button>
</header>
<div class="save-body">
<label class="lbl" for="svName" data-i18n="svName">Name</label>
<input id="svName" class="text-input" type="text" maxlength="120" required autocomplete="off">
<span class="lbl" data-i18n="svQuery">GitHub query</span>
<code id="svQuery" class="query-box"></code>
<label class="lbl" for="svEvery" data-i18n="svEvery">Frequency</label>
<div class="sched-row">
<select id="svEvery" class="text-input">
<option value="week" data-i18n="everyWeek">Every week</option>
<option value="day" data-i18n="everyDay">Every day</option>
<option value="hours" data-i18n="everyHours">Every N hours</option>
</select>
<select id="svWeekday" class="text-input" data-i18n-aria="svWeekday"></select>
<input id="svTime" class="text-input" type="time" value="08:00" required data-i18n-aria="svTime">
<span id="svHoursWrap" class="hours-wrap">
<input id="svHours" class="text-input" type="number" min="1" max="168" value="24" data-i18n-aria="svHours">
<span class="muted small" data-i18n="hoursUnit">hours</span>
</span>
</div>
<span class="lbl" data-i18n="svMax">Results kept</span>
<div id="svMax" class="seg" role="radiogroup" data-i18n-aria="svMax">
<button type="button" role="radio" data-max="30">30</button>
<button type="button" role="radio" data-max="50">50</button>
<button type="button" role="radio" data-max="100">100</button>
</div>
<span class="lbl" data-i18n="svEnabled">Active</span>
<label class="check"><input id="svEnabled" type="checkbox" checked> <span data-i18n="svEnabledHelp">Run on schedule</span></label>
</div>
<p id="svHint" class="muted small save-hint"></p>
<footer class="dlg-foot">
<button id="svDelete" class="btn danger" type="button" data-i18n="delete" hidden>Delete</button>
<span class="grow"></span>
<button id="svCancel" class="btn" type="button" data-i18n="cancel">Cancel</button>
<button id="svSubmit" class="btn primary" type="submit" data-i18n="save">Save</button>
</footer>
</form>
</dialog>
<div id="toast" class="toast" hidden></div>
<script src="app.js"></script>