Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
Commitd790b49unknown_key

feat(pr-list): title search filter + clear button

feat(pr-list): title search filter + clear button

Adds a search form above the PR list with a text input that filters
by PR title using ILIKE. The state filter (open/closed/etc.) is
preserved across searches. A "Clear" link appears when a query is
active. Empty state text adapts to distinguish "no results for query"
from "no PRs in this state".

https://claude.ai/code/session_01ACsT2Pc8GRoZwZRF8SK68Y
Claude committed on May 28, 2026Parent: 6cd2f0e
1 file changed+4512d790b49b007809488c061f1ab2be631e18429a5a
1 changed file+45−12
Modifiedsrc/routes/pulls.tsx+45−12View fileUnifiedSplit
1414 */
1515
1616import { Hono } from "hono";
17import { eq, and, desc, asc, sql, inArray } from "drizzle-orm";
17import { eq, and, desc, asc, sql, inArray, ilike, ne } from "drizzle-orm";
1818import { db } from "../db";
1919import {
2020 pullRequests,
18571857 const { owner: ownerName, repo: repoName } = c.req.param();
18581858 const user = c.get("user");
18591859 const state = c.req.query("state") || "open";
1860 const searchQ = c.req.query("q")?.trim() || "";
18601861
18611862 // ── Loading skeleton (flag-gated) ──
18621863 // Renders an SSR'd PR-row skeleton when `?skeleton=1` is set. Lets
19151916 .from(pullRequests)
19161917 .innerJoin(users, eq(pullRequests.authorId, users.id))
19171918 .where(
1918 and(eq(pullRequests.repositoryId, resolved.repo.id), stateFilter)
1919 and(
1920 eq(pullRequests.repositoryId, resolved.repo.id),
1921 stateFilter,
1922 searchQ ? ilike(pullRequests.title, `%${searchQ}%`) : undefined,
1923 )
19191924 )
19201925 .orderBy(desc(pullRequests.createdAt));
19211926
20402045 })}
20412046 </nav>
20422047
2048 <form
2049 method="get"
2050 action={`/${ownerName}/${repoName}/pulls`}
2051 style="display:flex;gap:8px;align-items:center;margin-bottom:14px"
2052 >
2053 <input type="hidden" name="state" value={state} />
2054 <input
2055 type="search"
2056 name="q"
2057 value={searchQ}
2058 placeholder="Search pull requests…"
2059 class="issues-search-input"
2060 style="flex:1;max-width:380px"
2061 />
2062 <button type="submit" class="issues-search-btn" aria-label="Search">{"🔍"}</button>
2063 {searchQ && (
2064 <a
2065 href={`/${ownerName}/${repoName}/pulls?state=${state}`}
2066 class="issues-filter-clear"
2067 >
2068 Clear
2069 </a>
2070 )}
2071 </form>
20432072 {prList.length === 0 ? (
20442073 <div class="prs-empty">
20452074 <div class="prs-empty-inner">
20462075 <strong>
2047 {isAllState
2048 ? "Pick a filter above to browse PRs."
2049 : `No ${state} pull requests.`}
2076 {searchQ
2077 ? `No pull requests match "${searchQ}"`
2078 : isAllState
2079 ? "Pick a filter above to browse PRs."
2080 : `No ${state} pull requests.`}
20502081 </strong>
20512082 <p class="prs-empty-sub">
2052 {state === "open"
2053 ? "Pull requests propose changes from a branch into the base. Open one to kick off AI review, gate checks, and (if eligible) auto-merge."
2054 : isAllState
2055 ? "The combined view is coming soon — Open, Merged, Closed, and Draft are all live above."
2056 : `No ${state} pull requests on ${ownerName}/${repoName} right now. Try a different filter.`}
2083 {searchQ
2084 ? `Try a different search term or clear the filter.`
2085 : state === "open"
2086 ? "Pull requests propose changes from a branch into the base. Open one to kick off AI review, gate checks, and (if eligible) auto-merge."
2087 : isAllState
2088 ? "The combined view is coming soon — Open, Merged, Closed, and Draft are all live above."
2089 : `No ${state} pull requests on ${ownerName}/${repoName} right now. Try a different filter.`}
20572090 </p>
20582091 <div class="prs-empty-cta">
2059 {user && state === "open" && (
2092 {user && state === "open" && !searchQ && (
20602093 <a href={`/${ownerName}/${repoName}/pulls/new`} class="btn btn-primary">
20612094 + New pull request
20622095 </a>
20632096 )}
2064 {state !== "open" && (
2097 {state !== "open" && !searchQ && (
20652098 <a href={`/${ownerName}/${repoName}/pulls?state=open`} class="btn">
20662099 View open PRs
20672100 </a>
20682101