Commit Graph

22 Commits

Author SHA1 Message Date
Rich Haines 4d2f7cc56e Send siteId as label on feedback GitHub issues (#353) 2026-04-02 10:59:01 +03:00
Rich Haines eafa640057 Add AI agent detection and automatic markdown rewrites (#351)
* Add AI agent detection and automatic markdown rewrites

When AI agents (Claude, ChatGPT, Cursor, etc.) request docs pages,
the proxy now detects them and transparently rewrites to the markdown
route — matching the geistdocs template default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix: Missing `detectionMethod` property in `TrackMdRequestParams` type causes TypeScript compilation error and build failure.

This commit fixes the issue reported at apps/docs/lib/geistdocs/md-tracking.ts:24

**Bug explanation:**

The `trackMdRequest` function in `apps/docs/lib/geistdocs/md-tracking.ts` destructures `detectionMethod` from its parameter (line 24) and includes it in the JSON body sent to the tracking endpoint (line 38). However, the `TrackMdRequestParams` type definition (lines 6-12) does not include `detectionMethod` as a property.

In `apps/docs/proxy.ts` (line 82-87), `trackMdRequest` is called with `detectionMethod: agentResult.method` when an AI agent is detected, where `agentResult.method` is of type `DetectionMethod | null` from `@/lib/ai-agent-detection`.

This causes an exact TypeScript compilation error confirmed in the build logs:
```
./lib/geistdocs/md-tracking.ts:24:3
Type error: Property 'detectionMethod' does not exist on type 'TrackMdRequestParams'.
```

This error causes the entire `docs` build to fail (`next build` exits with code 1).

**Fix explanation:**

Added `detectionMethod?: DetectionMethod | null` as an optional property to the `TrackMdRequestParams` type, and added the corresponding `import type { DetectionMethod } from "@/lib/ai-agent-detection"` import at the top of the file. The property is optional (`?`) because most call sites (for `.md` URL tracking, `llms.txt` tracking, and header-negotiated tracking) don't pass a `detectionMethod` — only the agent-rewrite tracking path does. The `| null` union matches the `DetectionResult.method` type from `ai-agent-detection.ts`.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: molebox <hello@richardhaines.dev>

* format

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
2026-03-29 02:19:37 +00:00
Dominik Ferber 84e38d47aa adds an playground app we can use during development (#341)
* add flags-playground

* clarify

* move

* update lockfile
2026-03-20 11:45:27 +01:00
Dominik Ferber df427e0e7a use catalog for react & react-dom (#318)
* use catalog for react & react-dom

this guarantees the same version for all packages and thus avoids type errors

* update lockfile
2026-03-09 19:01:30 +02:00
Dominik Ferber e5f3e34428 [docs] depend on workspace version of flags (#314)
* fix dep

* add packageManager

* move devDeps to top-level
2026-03-09 18:26:11 +02:00
Dominik Ferber 2db1530275 Upgrade dependencies (#313)
* upgrade

* update biome

* upgrade more
2026-03-09 12:24:42 +00:00
Vincent Derks d4d5470b6d Added skill reference to quickstart docs (#309) 2026-03-07 20:34:21 +01:00
Vincent Derks 689b1575f6 Flags core as normal dep (#298)
* Changed @vercel/flags-core to dependency from peerDependency

* Updated docs and skills

* More explanation

* Updated skill with singleton explanation and example

* update README

* FLAGS_SDK_KEY → FLAGS

* update skill

* update changeset

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
2026-03-05 12:53:04 +01:00
Dominik Ferber 581671d18e Flags-sdk.dev dark mode (#297)
* fix: add dark mode support to IframeBrowser component

- Add dark:bg-gray-800 to header bar
- Add dark:bg-gray-900 to input field
- Add dark:bg-black to iframe container

Fixes FLA-2542

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>

* fix: apply Biome formatting to iframe-browser.tsx

* fix

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-03-05 10:35:11 +01:00
Rich Haines dbb9fb2572 Add sitemap.md route (#293)
* Add sitemap.md route for LLM-friendly documentation indexing

* format

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
2026-03-03 15:53:22 +02:00
Dominik Ferber 179233746b add metadata base (#290)
* add metadata base

* add type keyword
2026-02-28 16:41:38 +01:00
Dominik Ferber a23ac64e50 rm console log (#286) 2026-02-25 10:56:45 +02:00
Dominik Ferber 42e07a19a0 fix flags explorer (#285)
* fix id warning

* set up toolbar & flags explorer

* fix discovery endpoint
2026-02-25 10:55:33 +02:00
Dominik Ferber d94c1df4a2 fix logos (#281) 2026-02-23 07:09:37 +02:00
Hayden Bleasel 626720619a Dark mode fixes (#276) 2026-02-13 20:17:30 +02:00
Hayden Bleasel 524d235cef Remove last modified plugin (#273) 2026-02-13 09:20:00 +02:00
Hayden Bleasel cf9ccd0076 Open Source Docs (#272)
* Scaffold Geistdocs instance

* Update biome.json

* Replace content

* Re-path docs

* Update docs package name

* Misc fixes

* Update geistdocs.tsx

* Move content to correct folder

* Start migrating custom components

* Finish migrating custom components

* Migrate existing redirects

* Remove #next suffixes from code blocks

* Migrate homepage and flags

* Remove duplicate lockfiles

* Start fixing homepage

* Replace Geist components

* Fix colors

* Improve layout

* Fix code blocks

* Fix hero

* Fix illustrations

* Fix redirect

* Fix nav links

* Patch in FrameworkSwitcher

* Bump Next.js in docs

* Delete turbo.json

* Misc fixes

* More logo fixes
2026-02-13 09:06:03 +02:00
dependabot[bot] 1d59ce11de Bump next from 16.0.10 to 16.1.5 in /packages/flags (#247)
* Bump next from 16.0.10 to 16.1.5 in /packages/flags

Bumps [next](https://github.com/vercel/next.js) from 16.0.10 to 16.1.5.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v16.0.10...v16.1.5)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 16.1.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updated lockfile

* Bump to 16.1.5 in other packages

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vincent Derks <vincent.derks@vercel.com>
2026-02-06 10:07:56 +01:00
vercel[bot] 23cf50428e Fix React Server Components CVE vulnerabilities (#235)
Updated dependencies to fix Next.js and React CVE vulnerabilities.

The fix-react2shell-next tool automatically updated the following packages to their secure versions:
- next
- react-server-dom-webpack
- react-server-dom-parcel  
- react-server-dom-turbopack

All package.json files have been scanned and vulnerable versions have been patched to the correct fixed versions based on the official React advisory.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2025-12-12 07:20:30 +02:00
Dominik Ferber f1376294aa upgrade (#226)
* upgrade

* use as-any workaround
2025-12-04 14:27:54 +02:00
Dominik Ferber ba4eec7b23 replace eslint and prettier with biome (#187)
* remove @pyra/eslint-config

* wip

* wip

* convert shirt-shop-api

* convert shirt-shop

* convert snippets

* convert next-13

* convert next-14

* convert next-15

* eslint configs

* upgrade prettier

* use eslint v9

* run prettier

* resolve type-check

* adjust eslint

* drop Next.js v13

* fix next-14

Avoid accidentally using implicitly installed eslint v8

* update lockfile

* rm @eslint/eslintrc

* add @next/eslint-plugin-next

* biome

* biome fixes

* wip

* apply formatting

* tabs

* rm prettier

* spaces

* fix svelte

* update lockfile

* single quotes

* format all

* rm eslint-disable comments

* upgrade playwright

* upgrade publint

* upgrade playwright ci workflow

* try chromium headless

* try adding executablePath
2025-10-15 23:38:17 +03:00
Dominik Ferber a5bfb13c43 extended example (#84)
* wip

* adapt nav

* store management

* ssr cart

* clean up

* fix stableId issue

* allow image sorting

* toast on ProceedToCheckoutButton

* move actions, extract components

* Add PPR to Cart (#85)

* toast on Shop now

* allow delay

* loading spinner

* wip

* fix animations

* show cart count

* Extend shirt-shop demo with dynamic flag usage (#86)

* better metadata

* wip

* move cart to api

* wip

* respect free shipping

* add example banner

* init shadcn

* reorg

* remove relative paths from components

* do not link footer

* wip

* remove shadcn setup

* api-server » shirt-shop-api

* /api/:cartId » /api/cart/:cartId

* add delayFlag desc

* fix cart count

* remove quantity

* fine tune animation

* shrink

* list envs, fix Link

* change flag names

* set cart-id from middleware

* append headers

* allow cloning

* add BACKEND_URL fallback
2025-03-04 17:05:13 +01:00