Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
abbeea4
fix: show platform-specific shortcut labels in toolbar tooltips
shrutig-blip Aug 13, 2026
11e43ae
perf: lazy-load images in markdown preview
shrutig-blip Aug 13, 2026
6e1359d
fix(deps): migrate MCP route to mcp-handler v2
Rinava Aug 14, 2026
873e1a5
Merge branch 'pr-135' into claude/vibrant-fermi-rf8s2j
claude Nov 10, 2026
bb69664
Merge branch 'pr-136' into claude/vibrant-fermi-rf8s2j
claude Nov 10, 2026
8f57f71
build(deps): roll up pending dependency updates
claude Nov 10, 2026
18519de
fix(seo): pin sitemap lastModified to fixed dates
claude Nov 10, 2026
fb5b568
chore: delete the unused export-markdown pipeline
claude Nov 10, 2026
bf65674
feat(analytics): read the Google Analytics ID from NEXT_PUBLIC_GA_ID
claude Nov 10, 2026
9d48b24
fix(security): drop the unsafe-inline and https: fallbacks from scrip…
claude Nov 10, 2026
e705cba
chore(dx): add a typecheck script and align on Node 22
claude Nov 10, 2026
d102630
docs(deps): explain the package.json overrides
claude Nov 10, 2026
000a0bc
test(export): pin HTML sanitization and document it
claude Nov 10, 2026
5aa4505
feat(security): rate-limit and cap the public API routes
claude Nov 10, 2026
759561d
test: add a jsdom project so hooks and components can be tested
claude Nov 10, 2026
4af92cb
test: cover marketplace discovery, import caps, contributors and storage
claude Nov 10, 2026
9037930
refactor(editor): remove the unreachable toolbar mode from MarkdownEd…
claude Nov 10, 2026
d72ee6d
refactor(toolbar): move the formatting engine into lib/markdown/forma…
claude Nov 10, 2026
126f7e3
refactor(ui): name magic numbers, flatten ternaries, tokenize colors,…
claude Nov 10, 2026
992254f
docs(changelog): backfill Unreleased
claude Nov 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@
# - Gateway path: "provider/model" slug, dots for versions
# (default: anthropic/claude-haiku-4.5)
# SKILL_AI_MODEL=

# --- Analytics: optional (off when unset) ----------------------------------
# Google Analytics measurement ID (looks like G-XXXXXXXXXX). Leave it unset and
# no GA script loads at all. Set it in your hosting environment to use your own
# property.
# NEXT_PUBLIC_GA_ID=

# --- Rate limiting: optional shared store ----------------------------------
# The public API routes (/api/mcp and /api/skill/improve) are rate limited per
# client IP. Without these the counters live in memory, per server instance,
# which is fine for local use but easy to dodge on serverless. Point them at an
# Upstash Redis database (free tier works) to share the counters everywhere.
# UPSTASH_REDIS_REST_URL=
# UPSTASH_REDIS_REST_TOKEN=
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ updates:
open-pull-requests-limit: 5
labels:
- dependencies
ignore:
# mcp-handler pins peer @modelcontextprotocol/sdk to an exact version, so
# bumping the SDK alone breaks `npm ci`. Drop once mcp-handler unpins.
- dependency-name: "@modelcontextprotocol/sdk"
groups:
# Batch low-risk minor/patch bumps into a single PR to cut review noise.
minor-and-patch:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
- name: Check formatting
run: npm run format:check

# Fast type gate: fails in seconds instead of waiting for the full build.
- name: Typecheck
run: npm run typecheck

# Unit tests (Vitest) — run before the slow build so they fail fast.
- name: Test
run: npm test
Expand Down
50 changes: 48 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,64 @@ Everything before this file existed was reconstructed from git history.
- Error boundary: a runtime error now shows a recovery page instead of a
blank screen
- Placeholder text in the empty markdown editor
- Copy button on code blocks in the preview
- Custom file name for HTML, PDF and Markdown exports
- Skip-to-content link for keyboard users
- Skill inspector shows quality hints (generic description, very long body,
no instruction-shaped sections) as warnings next to the validation checks
- Images in the preview load lazily
- `NEXT_PUBLIC_GA_ID`: Google Analytics is now opt-in per deployment, so forks
and self-hosted copies no longer report to the upstream property
- Rate limiting on the public API routes (`/api/mcp`, `/api/skill/improve`)
with an optional shared Upstash Redis store, plus a request size cap on the
MCP endpoint
- `npm run typecheck`, and a jsdom test project so hooks and components can be
tested (`*.test.tsx`)
- README: keyboard-shortcuts table and editor screenshots

### Changed

- MCP route migrated to `mcp-handler` 2.x. The endpoint is still `/api/mcp`;
the legacy SSE transport is gone
- Node 22 is now the minimum (matches `.nvmrc` and CI)
- The toolbar's formatting logic lives in `src/lib/markdown/format.ts` with
unit tests
- Code base formatted with Prettier, checked in CI

### Fixed

- Decorative logo icon hidden from the accessibility tree
- GitHub brand icon replaced with a local SVG (lucide dropped brand icons)
- Toolbar tooltips show `Ctrl` shortcuts on Windows and Linux instead of `⌘`
- Toggling a format off from the toolbar no longer throws the caret to the
wrong place
- Clear message when the browser blocks the export or print popup
- Error toast when copying a code block fails
- External links in the preview open in a new tab
- Theme toggle has an accurate accessible label
- Sitemap `lastmod` no longer changes on every deploy

### Security

- Zip imports are capped in file count and size
- `/api/skill/improve` rejects requests without an `Origin` header
- CSP `script-src` no longer carries the `'unsafe-inline'` / `https:` fallback
for legacy browsers
- Exported HTML is confirmed sanitized (raw HTML, event handlers and
`javascript:` links are stripped) and now covered by tests

### Removed

- Unused second export pipeline (`src/lib/export-markdown.tsx`) and the
unreachable toolbar mode inside the editor component

### Dependencies

- `ai` 6 → 7, `zod` 3 → 4, `typescript` 5.9 → 6.0, `lucide-react` 0.544 → 1.23,
plus grouped minor/patch updates
- Dependabot no longer auto-bumps `@modelcontextprotocol/sdk` (pinned for MCP
protocol stability)
- `next` 16.3 → 16.4, `mcp-handler` 1 → 2 (drops `@modelcontextprotocol/sdk`
for `@modelcontextprotocol/server`), and every other dependency refreshed
within its range

## [1.0.0] - 2026-07-06

Expand Down
45 changes: 36 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ on the approach before you invest time in it.

## Getting started

**Prerequisites:** [Node.js](https://nodejs.org/) 20 or newer (the project is
developed on Node 22) and npm (bundled with Node).
**Prerequisites:** [Node.js](https://nodejs.org/) 22 or newer (the version
pinned in `.nvmrc` and the one CI runs) and npm (bundled with Node).

```bash
# 1. Fork the repo on GitHub, then clone your fork
Expand All @@ -54,20 +54,34 @@ That's it. Edit a file under `src/` and the page hot-reloads.

### Available scripts

| Command | What it does |
| --------------- | ----------------------------------- |
| `npm run dev` | Start the dev server with Turbopack |
| `npm run build` | Production build |
| `npm run start` | Serve the production build |
| `npm run lint` | Run ESLint |
| `npm test` | Run the unit tests (Vitest) |
| Command | What it does |
| ------------------- | ---------------------------------------------- |
| `npm run dev` | Start the dev server with Turbopack |
| `npm run build` | Production build |
| `npm run start` | Serve the production build |
| `npm run lint` | Run ESLint |
| `npm run typecheck` | Type-check with `tsc --noEmit` (takes seconds) |
| `npm test` | Run the unit tests (Vitest) |

Brand assets (icons, social images) are generated from inline SVG:

```bash
node scripts/generate-assets.mjs
```

### Dependency overrides

`package.json` has an `overrides` block. JSON can't hold comments, so the
reasons live here:

| Override | Why it's there | When it can go |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `prismjs` | `react-syntax-highlighter` pulls in an older Prism through `refractor` that has a known DOM clobbering advisory. The override forces the patched 1.30 line. | Once `react-syntax-highlighter` depends on `prismjs` >= 1.30 by itself. |
| `postcss` | Next.js pins an exact, older `postcss` that has an XSS advisory in its CSS stringifier. The override dedupes everything onto a patched 8.5 release. | Once Next.js ships with `postcss` >= 8.5.10 and `npm ls postcss` is single. |

If you remove one, run `npm ls <package> --all` and `npm audit` to confirm
nothing vulnerable comes back.

## Development workflow

1. Create a branch off `main` with a descriptive, prefixed name:
Expand All @@ -82,6 +96,7 @@ node scripts/generate-assets.mjs

```bash
npm run lint
npm run typecheck
npm test
npm run build
```
Expand All @@ -102,6 +117,18 @@ src/
└── proxy.ts # security headers / CSP
```

## Writing tests

Tests live next to the code (`src/**/__tests__/` or a sibling `*.test.ts`) and
run with [Vitest](https://vitest.dev/). The file extension picks the
environment:

- `*.test.ts` runs in plain Node. Use it for pure logic (most of `src/lib`).
- `*.test.tsx` runs in jsdom with
[Testing Library](https://testing-library.com/docs/react-testing-library/intro/).
Use it for hooks and components. `src/lib/__tests__/use-debounced-value.test.tsx`
is a good one to copy from.

## Coding guidelines

- **Language:** TypeScript and React 19 (App Router). Prefer Server Components;
Expand Down
Loading
Loading