Skip to content

Commit 2530c36

Browse files
authored
Merge pull request #23 from BjornMelin/feat/cache-components-and-search-ux
feat(app): finalize cache-components search UX and bot preview resource governance
2 parents 77d2330 + 4ae0081 commit 2530c36

176 files changed

Lines changed: 17319 additions & 1645 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ NEON_AUTH_COOKIE_DOMAIN=
99
# App-side HMAC secret used to sign cached session data cookies (32+ chars).
1010
NEON_AUTH_COOKIE_SECRET=
1111

12+
# Optional: local smoke test credentials (for scripts/neon-auth-local.ts)
13+
NEON_AUTH_LOCAL_AGENT_USER_EMAIL=
14+
NEON_AUTH_LOCAL_AGENT_USER_PASS=
15+
1216
# App access policy (cost control)
1317
# "restricted": only allow authenticated users whose email is in AUTH_ALLOWED_EMAILS
1418
# "open": allow any authenticated user (use only after BYOK is implemented)
@@ -34,6 +38,7 @@ NEXT_PUBLIC_AUTH_SOCIAL_PROVIDERS=vercel
3438
APP_BASE_URL=
3539

3640
# Database (Neon Postgres)
41+
# Prefer connection strings with `sslmode=verify-full`.
3742
DATABASE_URL=
3843
# Optional: unpooled connection string (recommended for migrations/DDL).
3944
DATABASE_URL_UNPOOLED=

.github/actions/ci-setup/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ runs:
3131
with:
3232
bun-version: ${{ inputs.bun-version }}
3333

34+
- name: Cache Bun install
35+
uses: actions/cache@v5.0.3
36+
with:
37+
path: |
38+
~/.bun/install/cache
39+
key: bun-${{ runner.os }}-${{ inputs.bun-version }}-${{ hashFiles('bun.lock') }}
40+
restore-keys: |
41+
bun-${{ runner.os }}-${{ inputs.bun-version }}-
42+
bun-${{ runner.os }}-
43+
3444
- name: Install dependencies
3545
run: bun install --frozen-lockfile
3646
shell: bash

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ updates:
66
interval: "weekly"
77
day: "friday"
88
time: "04:00"
9+
ignore:
10+
# Keep typings aligned with Node LTS (we target Node 24.x).
11+
- dependency-name: "@types/node"
12+
update-types: ["version-update:semver-major"]
913
groups:
1014
dependencies:
1115
patterns:

.github/workflows/ci.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ concurrency:
1313
group: ci-${{ github.workflow }}-${{ github.ref }}
1414
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1515

16+
env:
17+
NEXT_TELEMETRY_DISABLED: "1"
18+
1619
jobs:
1720
lint:
1821
name: Lint (Biome + ESLint)
@@ -21,7 +24,7 @@ jobs:
2124
- name: Checkout
2225
uses: actions/checkout@v6.0.2
2326
with:
24-
fetch-depth: 0
27+
fetch-depth: 1
2528

2629
- name: Setup
2730
uses: ./.github/actions/ci-setup
@@ -36,7 +39,7 @@ jobs:
3639
- name: Checkout
3740
uses: actions/checkout@v6.0.2
3841
with:
39-
fetch-depth: 0
42+
fetch-depth: 1
4043

4144
- name: Setup
4245
uses: ./.github/actions/ci-setup
@@ -51,7 +54,7 @@ jobs:
5154
- name: Checkout
5255
uses: actions/checkout@v6.0.2
5356
with:
54-
fetch-depth: 0
57+
fetch-depth: 1
5558

5659
- name: Setup
5760
uses: ./.github/actions/ci-setup
@@ -67,10 +70,20 @@ jobs:
6770
- name: Checkout
6871
uses: actions/checkout@v6.0.2
6972
with:
70-
fetch-depth: 0
73+
fetch-depth: 1
7174

7275
- name: Setup
7376
uses: ./.github/actions/ci-setup
7477

78+
- name: Cache Next.js build cache
79+
uses: actions/cache@v5.0.3
80+
with:
81+
path: |
82+
${{ github.workspace }}/.next/cache
83+
key: nextcache-${{ runner.os }}-${{ hashFiles('bun.lock', 'package.json', 'tsconfig.json', 'postcss.config.mjs', 'next.config.ts', 'src/**/*.ts', 'src/**/*.tsx', 'src/**/*.js', 'src/**/*.jsx') }}
84+
restore-keys: |
85+
nextcache-${{ runner.os }}-${{ hashFiles('bun.lock', 'package.json', 'tsconfig.json', 'postcss.config.mjs', 'next.config.ts') }}-
86+
nextcache-${{ runner.os }}-
87+
7588
- name: Build
7689
run: bun run build

.github/workflows/neon-auth-trusted-domains.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ jobs:
2424
name: Ensure Neon Auth trusted domains
2525
runs-on: ${{ fromJSON(vars.ACTIONS_RUNNER_LABELS || '["ubuntu-latest"]') }}
2626
# Secrets are not available on forked PRs.
27-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
27+
if: |
28+
github.event_name != 'pull_request' ||
29+
(
30+
github.event.pull_request.head.repo.fork == false &&
31+
github.event.pull_request.user.login != 'dependabot[bot]' &&
32+
github.event.pull_request.user.login != 'renovate[bot]' &&
33+
!startsWith(github.event.pull_request.head.ref, 'dependabot/') &&
34+
!startsWith(github.event.pull_request.head.ref, 'renovate/')
35+
)
2836
steps:
2937
- name: Checkout
3038
uses: actions/checkout@v6.0.2
@@ -61,6 +69,11 @@ jobs:
6169
GIT_BRANCH="${GITHUB_REF_NAME}"
6270
fi
6371
72+
if printf '%s' "${GIT_BRANCH}" | grep -Eq '^(dependabot/|renovate/)'; then
73+
echo "::warning::Bot branch detected (${GIT_BRANCH}). Skipping trusted-domain allowlisting."
74+
exit 0
75+
fi
76+
6477
# When using the Neon <-> Vercel integration with Preview Branching,
6578
# Neon creates branches named "preview/<git-branch>".
6679
NEON_BRANCH_NAME="preview/${GIT_BRANCH}"

0 commit comments

Comments
 (0)