Files
substrata/package-plan.json
CatoandClaude 116e9537d0 feat(comments): page discussion is chatkit's CommentThread (#387)
* feat(comments): page discussion is chatkit's CommentThread

The discussion under notes, learn, resources and profile pages was a
hand-rolled list and a bare <textarea> with no microphone. The fleet rule
is that comments are chatkit's CommentThread and that anywhere a person
types words there is a microphone, so:

- Bump @bitbaum/chatkit ^0.22.1 -> ^0.25.0 (CommentThread arrived in 0.23).
  Ask (ResearchChat, AskBox) type-checks and renders unchanged.
- PageDiscussion renders CommentThread: the box is chatkit's Composer with
  the microphone (/api/transcribe), Enter-to-send, and a refused post keeps
  the draft. Posting still goes to /api/comments, where threadkit's
  canWrite decides who may write; a signed-out reader (from /api/me) sees
  "Sign in to comment" linking to sign-in and back to the page instead of
  a box that only fails on submit. Dates keep the YYYY-MM-DD form and
  authors keep "Reader" / "Substrata". Fact-check stays Substrata's and
  re-mounts the thread with its new comment.
- Drop the CSS the package now owns (.page-comments, .comment-meta,
  .comment-form); bind PageDiscussion under the chat block of
  package-plan.json; note it in docs/IMPLEMENTATION-PLAN.md.

Claude-Session: https://claude.ai/code/session_019MDtmuvTGrpo3VChP3skH8

* fix(comments): a refused comment says why, and no sign-in link where sign-in is off

The route's refusals (too short, the hourly limit, sign in) are thrown as
chatkit's CommentRefused, so the thread shows them instead of a generic
"try again" that would fail the same way forever; a comment under the
route's 3-character floor is refused before it is sent. The sign-in link
shows only once /api/me says sign-in exists on this deployment.

Needs @bitbaum/chatkit 0.28.0 (CommentRefused); the bump follows.

Claude-Session: https://claude.ai/code/session_019MDtmuvTGrpo3VChP3skH8

* chore(deps): @bitbaum/chatkit ^0.28.0 (CommentRefused)

Claude-Session: https://claude.ai/code/session_019MDtmuvTGrpo3VChP3skH8

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 12:48:41 +01:00

240 lines
6.8 KiB
JSON

{
"blocks": {
"shell": {
"package": "@bitbaum/sitekit",
"exception": "Substrata's desktop needs a persistent research/map workspace sidebar, mobile tabs, reviewer controls and a command palette. The shared masthead would duplicate those controls and cannot represent this navigation model; SiteKit still renders its typed hosted-content sections below, and the footer is SiteKit's SiteFooter."
},
"identity": {
"package": "@bitbaum/accountkit",
"bindings": [
{
"file": "lib/auth.ts",
"symbols": ["orangecatClient", "orangecatProvider", "syncOcSession"]
}
]
},
"publishing": {
"package": "@bitbaum/bip-kit",
"exception": "BipKit's release roadmap and changelog templates do not model Substrata's evidence-led research updates. BipKit is used for authored learning and notes articles; the custom roadmap remains a research feed, not a product release log."
},
"design": {
"package": "@bitbaum/design-tokens",
"bindings": [
{
"file": "app/layout.tsx",
"symbols": []
}
]
},
"ai": {
"package": "@bitbaum/ai-kit",
"bindings": [
{
"file": "lib/byok-ask.ts",
"symbols": ["complete"]
},
{
"file": "lib/chat-agent/turn.ts",
"symbols": ["completeStream", "createLinkCooldown", "freeChain", "usableChain"]
},
{
"file": "lib/chat-web.ts",
"symbols": ["readPage", "webSearch"]
},
{
"file": "lib/quality/page-text.ts",
"symbols": ["defaultLookup", "validateFetchTarget"]
}
]
},
"chat": {
"package": "@bitbaum/chatkit",
"bindings": [
{
"file": "components/portal/ResearchChat.tsx",
"symbols": ["ChatApp", "localConversationStore"]
},
{
"file": "app/_home/AskBox.tsx",
"symbols": ["Composer"]
},
{
"file": "components/portal/Inquire.tsx",
"symbols": ["Composer"]
},
{
"file": "components/portal/chat/ContributeForm.tsx",
"symbols": ["Composer"]
},
{
"file": "components/portal/PageDiscussion.tsx",
"symbols": ["CommentThread"]
}
]
},
"hosted-content": {
"package": "@bitbaum/sitekit",
"bindings": [
{
"file": "app/[...path]/page.tsx",
"symbols": ["SiteSections"]
},
{
"file": "components/portal/Shell.tsx",
"symbols": ["SiteFooter"]
}
]
},
"articles": {
"package": "@bitbaum/bip-kit",
"bindings": [
{
"file": "app/notes/[slug]/page.tsx",
"symbols": ["ArticleBody"]
},
{
"file": "app/learn/[slug]/page.tsx",
"symbols": ["ArticleBody"]
}
]
},
"charts": {
"package": "@bitbaum/chartkit",
"bindings": [
{
"file": "lib/profile/modules/country.tsx",
"symbols": ["BarChart"]
},
{
"file": "components/portal/chat/chartRenderers.tsx",
"symbols": ["BarChart", "LineChart", "ShareBars", "StatTiles", "Timeline"]
},
{
"file": "components/portal/Status.tsx",
"symbols": ["Meter"]
},
{
"file": "components/quality/Trend.tsx",
"symbols": ["LineChart"]
},
{
"file": "lib/profile/modules/quantities.tsx",
"symbols": ["Meter"]
}
]
},
"dates": {
"package": "@bitbaum/whenkit",
"bindings": [
{
"file": "components/ui/date-input.tsx",
"symbols": ["DateInput"],
"usageFiles": ["components/review/LeadDraft.tsx"]
},
{
"file": "lib/entry/vocab.ts",
"symbols": ["isISODate"]
},
{
"file": "lib/registry/schema.ts",
"symbols": ["isISODate"]
},
{
"file": "lib/graph/validate.ts",
"symbols": ["isISODate"]
},
{
"file": "lib/event-rules.ts",
"symbols": ["isISODate"]
},
{
"file": "lib/event-draft.ts",
"symbols": ["isISODate"]
},
{
"file": "lib/quality/checks-corpus.ts",
"symbols": ["isISODate"]
},
{
"file": "lib/quality/checks-misc.ts",
"symbols": ["isISODate"]
},
{
"file": "lib/market-data/prices/compute.ts",
"symbols": ["addDays", "daysBetween"]
},
{
"file": "lib/starters.ts",
"symbols": ["daysBetween", "isISODate"]
}
]
},
"lists": {
"package": "@bitbaum/listkit",
"bindings": [
{
"file": "components/portal/Board.tsx",
"symbols": ["writeQuery"]
},
{
"file": "lib/universe/directory.ts",
"symbols": ["parseQuery", "applyQuery", "ListSpec"]
},
{
"file": "app/data/series/page.tsx",
"symbols": ["parseQuery", "applyQuery", "matches", "ListSpec"]
},
{
"file": "lib/list-more.ts",
"symbols": ["writeQuery"]
},
{
"file": "lib/careers-query.ts",
"symbols": ["likeContains"]
}
]
},
"search": {
"package": "@bitbaum/searchkit",
"bindings": [
{
"file": "lib/search/expand.ts",
"symbols": ["candidates"]
},
{
"file": "lib/search/build.ts",
"symbols": ["createVocabulary"]
},
{
"file": "components/shell/CommandPalette.tsx",
"symbols": ["useSearchAsYouType"]
}
]
},
"threads": {
"package": "@bitbaum/threadkit",
"bindings": [
{
"file": "lib/page-thread.ts",
"symbols": ["canWrite", "visibleMessages"]
}
]
},
"geography": {
"package": "@bitbaum/geo-kit",
"bindings": [
{
"file": "components/portal/globe-resource.ts",
"symbols": ["loadGeographyManifest", "loadGeographyResources"]
}
]
}
},
"migration": {
"scope": "This wave retires the local ChartKit fork for immutable ChartKit 0.1.1, consumes ChatKit 0.15.3 with Unicode-aware CJK word-boundary checks, and adds actual app browser evidence. Pending blocks are missing adoption, not exceptions or successful composition. Existing OrangeCat/NextAuth adapter remains; account-method conformance and broader AI transport migration remain separate plan work."
},
"productOwned": {
"domain": "Research tools, evidence/citations, supply-chain graphs and narrative answers remain Substrata domain behavior."
}
}