Repository navigation
chore(apps): check the docs site and viewer in CI, and bind the viewer to the engine's types - #40
Merged
Merged
Conversation
…r to the engine's types #37 imported refract-docs and refract-ui into apps/docs and apps/ui, but nothing ran their checks: their workflows sat under apps/*/.github, which GitHub does not read, and the root vitest config excludes apps/. docs-site.yml and viewer.yml run each app's lint, tests and build, path-filtered and separate from the engine gate. viewer.yml also runs when packages/evidence-graph or docs/examples change. The viewer's hand-kept event types had drifted: they still listed the claim_* names the engine renamed sentence_*, and lacked edit_cluster_detected and talk_activity_spike, so timeline colours keyed to the old names never applied. It now imports EventType and EvidenceEvent from @refract-org/evidence-graph as types only (the bundle is unchanged in content), and its event list is a Record<EventType, true>: adding a fake type to the engine's EventType fails the viewer's build. Weakening and strengthening are coloured from directionSignal. engine-contract.test.ts imports, lists and re-exports the engine output in docs/examples and an event of every type. Per-app lockfiles, .husky, mise.toml and prepare scripts are removed in favour of the root's; each app's .lintstagedrc.json, biome.json, .opencode and LICENSE stay. Package links, AGENTS.md, README, COMPATIBILITY.md, docs/repositories.md and the site pages that said to clone refract-ui now point at this repository. The public site URL is unchanged; deployment still runs from refract-docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of the follow-ups to #37, which imported
refract-docsandrefract-uiintoapps/docsandapps/ui. This covers step 2 ofdocs/repositories.md("move the viewer") and the CI half of step 1. The docs deploy, the Python adapter and retiring the old repos come in separate PRs.Nothing was checking the apps
Since #37, nothing has run the apps' lint, tests or builds:
apps/*/.github, which GitHub doesn't readapps/This PR adds two path-filtered workflows, kept separate from the engine gate:
docs-site.ymlruns the docs site's checksviewer.ymlruns the viewer's checks, and also runs whenpackages/evidence-graphordocs/exampleschange, since those are what the viewer's contract checks againstThe viewer's event types had drifted
apps/ui/src/types.tskept its own copy of the engine's types. That copy:claim_first_seen,claim_softenedand the otherclaim_*names, which the engine renamedsentence_*edit_cluster_detectedandtalk_activity_spikeAs a result, the timeline colours keyed to the old names never applied.
The viewer now:
EventTypeandEvidenceEventfrom@refract-org/evidence-graphas types only (workspace:*). The bundle carries nothing from the engine and is about the same size: 30.8 kB, was 30.6 kB.Record<EventType, true>. Adding a fake type to the engine'sEventTypefails the viewer's build with "Property 'drift_probe' is missing" (tested, then reverted).directionSignal, since the engine no longer hasclaim_softenedorclaim_strengthenedtests/engine-contract.test.ts, which imports, lists and re-exports the engine output indocs/examples/and an event of every type. It checks that each event comes out deep-equal to what went in.Removed per-app scaffolding
bun.lock, the docs site'spackage-lock.json, the.huskyfolders, themise.tomlfiles (identical to the root's), theprepare: huskyscripts, and the dead.githubfolders. The docs site'sCODEOWNERSnamed the same team as the root's..lintstagedrc.json(the root hook applies it, as this commit's own hook run shows), plusbiome.json,.opencode,LICENSEandAGENTS.md.Docs
The package links, both apps'
AGENTS.mdfiles, the root README,AGENTS.md,COMPATIBILITY.mdanddocs/repositories.mdnow say where each app lives and which workflow checks it. So do the site pages that told readers to clonerefract-ui.The public site URL is unchanged, and the site still deploys from
refract-docs; the next PR moves that.Verification
build,biome ci packages/,typecheck,check:boundaries,test(408 passed, 9 live-API tests skipped),check:examplesandcheck:release --packall pass.apps/docs: lint, tests (103) and build pass.apps/ui: lint, tests (31) and build pass.For a decision
apps/ui/LICENSEis an MIT licence ("Copyright (c) 2024 NextConsensus"), but itspackage.jsondeclares AGPL-3.0, anddocs/repositories.mdplanned AGPL-3.0. This PR changes neither.🤖 Generated with Claude Code