Skip to content

Commit 4ae046d

Browse files
committed
feat: adjust per page and promote some first changelogs on index
1 parent ad4c866 commit 4ae046d

9 files changed

Lines changed: 150 additions & 18 deletions

File tree

apps/changelog-api/src/workflows/github/steps/fetch-and-sync-commits.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function fetchAndSyncCommits({
2929
const baseParams = {
3030
owner,
3131
repo,
32-
per_page: 100,
32+
per_page: 50,
3333
...(since ? { since: since.toISOString() } : {}),
3434
...(until ? { until: until.toISOString() } : {}),
3535
...(headSha ? { sha: headSha } : {}),

apps/changelog-api/src/workflows/github/steps/fetch-and-sync-issues.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function fetchAndSyncIssues({
2626
const baseParams = {
2727
owner,
2828
repo,
29-
per_page: 100,
29+
per_page: 10,
3030
state: "all",
3131
sort: "updated",
3232
direction: "desc",

apps/changelog-api/src/workflows/github/steps/fetch-and-sync-pull-requests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function fetchAndSyncPullRequests({
2626
const baseParams = {
2727
owner,
2828
repo,
29-
per_page: 100,
29+
per_page: 10,
3030
state: "all",
3131
sort: "updated",
3232
direction: "desc",

apps/changelog-api/src/workflows/github/steps/fetch-and-sync-releases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function fetchAndSyncReleases({
2121
owner,
2222
repo,
2323
}: FetchAndSyncReleasesParams) {
24-
const baseParams = { owner, repo, per_page: 100 } satisfies ListReleasesParameters;
24+
const baseParams = { owner, repo, per_page: 10 } satisfies ListReleasesParameters;
2525

2626
for await (const page of octokit.paginate.iterator(
2727
"GET /repos/{owner}/{repo}/releases",

apps/changelog-api/src/workflows/github/steps/fetch-and-sync-repositories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function fetchAndSyncRepositories({
2424
const isOrg = user.data.type === "Organization";
2525

2626
const baseParams = {
27-
per_page: 100,
27+
per_page: 50,
2828
type: "all",
2929
sort: "updated",
3030
direction: "desc",

apps/changelog-api/src/workflows/github/steps/fetch-and-sync-tags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type FetchAndSyncTagsParams = {
1616
};
1717

1818
export async function fetchAndSyncTags({ octokit, db, owner, repo }: FetchAndSyncTagsParams) {
19-
const baseParams = { owner, repo, per_page: 100 } satisfies ListTagsParameters;
19+
const baseParams = { owner, repo, per_page: 50 } satisfies ListTagsParameters;
2020

2121
for await (const page of octokit.paginate.iterator(
2222
"GET /repos/{owner}/{repo}/tags",

apps/changelog-app/src/components/footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function Footer() {
1313
const footerScale = useTransform(scrollYProgress, [0, 0.655, 0.965], [0.85, 0.9, 1]);
1414

1515
return (
16-
<div className="max-w-3xl mx-auto pb-12">
16+
<div className="max-w-3xl mx-auto pb-12 mt-8">
1717
<motion.footer
1818
style={{ opacity: footerOpacity, scale: footerScale }}
1919
className="relative will-change-auto border border-border rounded-3xl shadow-2xl/25"
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import { Button } from "@asyncstatus/ui/components/button";
2+
import { ArrowRightIcon, BugIcon, EyeIcon, GitBranch, StarIcon } from "@asyncstatus/ui/icons";
3+
import { Link } from "@tanstack/react-router";
4+
5+
type RepoCardProps = {
6+
owner: string;
7+
repo: string;
8+
description: string;
9+
stargazersCount: number;
10+
watchersCount: number;
11+
forksCount: number;
12+
openIssuesCount: number;
13+
};
14+
15+
export function RepoCard({
16+
owner,
17+
repo,
18+
description,
19+
stargazersCount,
20+
watchersCount,
21+
forksCount,
22+
openIssuesCount,
23+
}: RepoCardProps) {
24+
return (
25+
<div className="flex flex-col gap-1 p-4 border border-border/20 rounded-3xl shadow-2xl/10 bg-background/10 max-w-md">
26+
<p className="text-xl truncate text-white" title={`${owner}/${repo}`}>
27+
{owner}/{repo}
28+
</p>
29+
30+
<div className="flex-1 flex flex-col gap-1 text-muted-foreground max-sm:gap-4">
31+
<p className="text-sm line-clamp-2 text-white/60" title={description}>
32+
{description}
33+
</p>
34+
35+
<div className="flex items-center gap-4 text-muted-foreground">
36+
<a
37+
href={`https://github.com/${owner}/${repo}/stargazers`}
38+
target="_blank"
39+
rel="noopener"
40+
className="flex items-center gap-1 text-white/60 hover:text-white active:text-white focus:text-white transition-colors duration-75"
41+
>
42+
<StarIcon className="size-4" />
43+
{stargazersCount}
44+
</a>
45+
<a
46+
href={`https://github.com/${owner}/${repo}/watchers`}
47+
target="_blank"
48+
rel="noopener"
49+
className="flex items-center gap-1 text-white/60 hover:text-white active:text-white focus:text-white transition-colors duration-75"
50+
>
51+
<EyeIcon className="size-4" />
52+
{watchersCount}
53+
</a>
54+
<a
55+
href={`https://github.com/${owner}/${repo}/forks`}
56+
target="_blank"
57+
rel="noopener"
58+
className="flex items-center gap-1 text-white/60 hover:text-white active:text-white focus:text-white transition-colors duration-75"
59+
>
60+
<GitBranch className="size-4" />
61+
{forksCount}
62+
</a>
63+
<a
64+
href={`https://github.com/${owner}/${repo}/issues`}
65+
target="_blank"
66+
rel="noopener"
67+
className="flex items-center gap-1 text-white/60 hover:text-white active:text-white focus:text-white transition-colors duration-75"
68+
>
69+
<BugIcon className="size-4" />
70+
{openIssuesCount}
71+
</a>
72+
</div>
73+
</div>
74+
75+
<Button asChild variant="ghost" className="w-full max-sm:mt-4 bg-white/20 text-white/80">
76+
<Link to="/$owner/$repo" params={{ owner, repo }}>
77+
See changelogs
78+
<ArrowRightIcon className="size-4" />
79+
</Link>
80+
</Button>
81+
</div>
82+
);
83+
}

apps/changelog-app/src/routes/_layout.index.tsx

Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { BlueprintBackground } from "@/components/blueprint-background";
66
import { DustOverlay } from "@/components/dust-overlay";
77
import { NoiseBackground } from "@/components/noise-background";
88
import { PaperTextureOverlay } from "@/components/paper-texture-overlay";
9+
import { RepoCard } from "@/components/repo-card";
910
import { VignetteOverlay } from "@/components/vignette-overlay";
1011

1112
const LightRays = lazy(() => import("@/components/light-rays-2"));
@@ -53,9 +54,9 @@ function RouteComponent() {
5354
</Suspense>
5455
</div>
5556

56-
<div className="relative z-50 flex items-center justify-center min-h-screen p-8">
57+
<div className="relative z-50 flex flex-col items-center justify-center min-h-screen p-8 max-sm:p-2 mt-56">
5758
<div className="relative max-w-3xl w-full">
58-
<div className="relative backdrop-blur-sm border border-white/30 rounded-3xl bg-background/10 p-8 py-12 shadow-2xl">
59+
<div className="relative backdrop-blur-sm border border-white/30 rounded-3xl bg-background/10 p-8 py-12 max-sm:p-2 max-sm:py-12 shadow-2xl">
5960
<div className="absolute -top-6 -left-6 w-4 h-4 border-l-2 border-t-2 border-white/30"></div>
6061
<div className="absolute -top-6 -right-6 w-4 h-4 border-r-2 border-t-2 border-white/30"></div>
6162
<div className="absolute -bottom-6 -left-6 w-4 h-4 border-l-2 border-b-2 border-white/30"></div>
@@ -67,20 +68,22 @@ function RouteComponent() {
6768
<div className="absolute -right-1 top-8 bottom-8 w-px bg-gradient-to-b from-transparent via-white/40 to-transparent"></div>
6869

6970
<div className="text-center text-white relative">
70-
<h1 className="text-5xl font-bold mb-2 mt-2">Changelogs AI</h1>
71-
<h2 className="text-xl opacity-90 mb-10">
71+
<h1 className="text-5xl font-bold mb-2 mt-2 max-sm:mb-4 max-sm:text-3xl">
72+
Changelogs AI
73+
</h1>
74+
<h2 className="text-xl opacity-90 mb-10 max-sm:text-lg">
7275
Paste your repo. Get clean release notes. Done.
7376
</h2>
7477

7578
<div className="mb-6 max-w-md mx-auto">
79+
<p className="sm:hidden text-white/60 text-xs mb-2 text-left">github.com/</p>
7680
<form
7781
className="relative flex items-stretch bg-white/10 backdrop-blur-sm border border-white/30 rounded-lg overflow-hidden"
7882
onSubmit={(e) => {
7983
e.preventDefault();
8084
const formData = new FormData(e.currentTarget);
8185
const ownerAndRepo = formData.get("ownerAndRepo") as string;
8286
const [owner, repo] = ownerAndRepo.split("/");
83-
console.log(owner, repo);
8487
if (owner && repo) {
8588
navigate({
8689
to: "/$owner/$repo",
@@ -102,13 +105,13 @@ function RouteComponent() {
102105
}}
103106
>
104107
<div className="relative flex items-center w-full">
105-
<p className="absolute left-4 top-1/2 -translate-y-1/2 text-white/60 select-none pointer-events-none">
108+
<p className="absolute left-4 top-1/2 -translate-y-1/2 text-white/60 select-none pointer-events-none max-sm:hidden">
106109
github.com/
107110
</p>
108111
<input
109112
name="ownerAndRepo"
110113
placeholder="asyncstatus/asyncstatus"
111-
className="flex-1 bg-transparent pl-[6.64rem] pr-4 py-3 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-white/50 focus:ring-inset min-h-[48px]"
114+
className="flex-1 bg-transparent pl-[6.64rem] max-sm:pl-4 pr-4 py-3 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-white/50 focus:ring-inset min-h-[48px]"
112115
onPaste={(e) => {
113116
const raw = e.clipboardData.getData("text");
114117
let text = raw.trim();
@@ -139,10 +142,14 @@ function RouteComponent() {
139142
</form>
140143
</div>
141144

142-
<div className="flex justify-center space-x-4 text-sm opacity-70">
143-
<span>• AI powered</span>
144-
<span>• Zero setup</span>
145-
<span>• Actually good</span>
145+
<div className="flex justify-center space-x-4 text-sm opacity-70 max-sm:hidden">
146+
<span className="max-sm:text-lg">• AI powered</span>
147+
<span className="max-sm:text-lg">• Zero setup</span>
148+
<span className="max-sm:text-lg">• Actually good</span>
149+
</div>
150+
151+
<div className="opacity-70 text-lg px-4 text-pretty sm:hidden">
152+
AI powered • Zero setup • Actually good
146153
</div>
147154
</div>
148155
</div>
@@ -157,6 +164,48 @@ function RouteComponent() {
157164
Powered by <AsyncStatusLogo className="size-3" /> AsyncStatus
158165
</a>
159166
</div>
167+
168+
<div className="mt-24 grid grid-cols-2 gap-4 max-sm:grid-cols-1">
169+
<RepoCard
170+
owner="asyncstatus"
171+
repo="asyncstatus"
172+
description="Async status updates for remote startups."
173+
stargazersCount={11}
174+
watchersCount={1}
175+
forksCount={0}
176+
openIssuesCount={0}
177+
/>
178+
179+
<RepoCard
180+
owner="over-sh"
181+
repo="bun"
182+
description="ncredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one"
183+
stargazersCount={80156}
184+
watchersCount={575}
185+
forksCount={3296}
186+
openIssuesCount={5328}
187+
/>
188+
189+
<RepoCard
190+
owner="tinygrad"
191+
repo="teenygrad"
192+
description="If tinygrad wasn't small enough for you..."
193+
stargazersCount={736}
194+
watchersCount={11}
195+
forksCount={102}
196+
openIssuesCount={6}
197+
/>
198+
199+
<RepoCard
200+
owner="patroninc"
201+
repo="patron"
202+
description="An open source Patreon alternative with lower fees designed for creators who publish ongoing sequential content like books, podcasts, and comics."
203+
stargazersCount={59}
204+
watchersCount={2}
205+
forksCount={2}
206+
openIssuesCount={1}
207+
/>
208+
</div>
160209
</div>
161210
</div>
162211
);

0 commit comments

Comments
 (0)