-
Notifications
You must be signed in to change notification settings - Fork 55
frontend web
github-actions[bot] edited this page Feb 26, 2026
·
2 revisions
- Render the ClawSec website for home, skills catalog/detail, and advisory feed/detail experiences.
- Render repository wiki content from
wiki/markdown and expose per-pagellms.txtlinks. - Provide resilient JSON fetch behavior that handles SPA HTML fallback cases.
- Display install commands, checksums, and advisory metadata in a browser-focused UX.
-
index.tsx: React bootstrap and root mount. -
App.tsx: Router map and page entry wiring. -
pages/Home.tsx: Landing page, install card, animated platform/file labels. -
pages/SkillsCatalog.tsx: Catalog fetch/filter state machine and empty-state handling. -
pages/SkillDetail.tsx: Loadsskill.json, checksums, README/SKILL docs with markdown renderer. -
pages/FeedSetup.tsx: Advisory listing UI with pagination. -
pages/AdvisoryDetail.tsx: Advisory deep-dive view and source links. -
pages/WikiBrowser.tsx: In-app wiki renderer with wiki-page andllms.txtlinks. -
components/Layout.tsx+components/Header.tsx: Shared shell and nav behavior.
- Browser routes:
//skills/skills/:skillId/feed/feed/:advisoryId/wiki/*
- Static fetch targets:
/skills/index.json/skills/<skill>/skill.json/skills/<skill>/checksums.json/advisories/feed.json/wiki/llms.txt/wiki/<page>/llms.txt
- Display contracts:
-
SkillMetadata,SkillJson,SkillChecksums,AdvisoryFeed,Advisoryfromtypes.ts.
-
Inputs/outputs are summarized in the table below.
| Type | Name | Location | Description |
|---|---|---|---|
| Input | Skills index JSON | /skills/index.json |
List of published skills and metadata. |
| Input | Skill payload files |
/skills/<id>/skill.json, markdown docs, checksums.json
|
Detail-page content and integrity table. |
| Input | Advisory feed JSON |
/advisories/feed.json, then https://clawsec.prompt.security/advisories/feed.json (legacy mirror fallback to /releases/latest/download/feed.json) |
Advisory list/detail content. |
| Output | Route-specific UI states | Browser view state | Loading, empty, error, and populated experiences. |
| Output | Copy-to-clipboard commands | Clipboard API | Install and checksum snippets copied for users. |
- Build/runtime config comes from:
-
vite.config.ts(port, host, path alias) -
index.htmlTailwind config + custom fonts/colors -
constants.ts(ADVISORY_FEED_URL,LOCAL_FEED_PATH)
-
- Wiki markdown source lives in
wiki/;scripts/generate-wiki-llms.mjsgeneratespublic/wiki/**/llms.txt(viapredev/prebuild). - Runtime behavior assumptions:
- JSON responses may be empty or HTML fallback and must be validated.
- Advisory list pagination uses
ITEMS_PER_PAGE = 9.
// Catalog fetch logic guards against HTML fallback responses
const contentType = response.headers.get('content-type') ?? '';
const raw = await response.text();
if (!raw.trim() || contentType.includes('text/html') || isProbablyHtmlDocument(raw)) {
setSkills([]);
setFilteredSkills([]);
return;
}// Route map defined in App.tsx
<Route path="/skills/:skillId" element={<SkillDetail />} />
<Route path="/feed/:advisoryId" element={<AdvisoryDetail />} />
<Route path="/wiki/*" element={<WikiBrowser />} />- Missing
skills/index.jsonreturns empty catalog instead of hard failure. - Some environments return
index.htmlfor missing JSON paths with status200; code defends against this. - Skill detail tolerates missing/malformed checksums and missing markdown docs.
- Advisory detail handles absent optional fields (
cvss_score,reporter,references).
| Test Type | Location | Notes |
|---|---|---|
| Type/lint/build checks |
scripts/prepare-to-push.sh + CI |
Frontend confidence comes from static checks and build success. |
| App-wide CI gates | .github/workflows/ci.yml |
Multi-OS TypeScript/ESLint/build checks. |
| Manual smoke checks | npm run dev |
Validate route rendering and fetch paths during development. |
- index.tsx
- App.tsx
- pages/Home.tsx
- pages/SkillsCatalog.tsx
- pages/SkillDetail.tsx
- pages/FeedSetup.tsx
- pages/AdvisoryDetail.tsx
- pages/WikiBrowser.tsx
- pages/Checksums.tsx
- components/Layout.tsx
- components/Header.tsx
- constants.ts
- types.ts
- vite.config.ts
- index.html
- scripts/generate-wiki-llms.mjs