Files
CatoandClaude Opus 5.5 cfaf05a10c refactor: split the god files by job, and globals.css by feature (#83)
Every code file the size ratchet grandfathered is now under its 300-line
ceiling, split by what it does rather than by line count:

- lib/search.ts -> entry + lib/search/{text,corpus,build,expand,score,snippets}
- lib/chat-tools.ts -> lib/chat-tools/ (one module per tool family + registry)
- lib/chat-agent.ts -> lib/chat-agent/{loop,parse,turn,prompt,stream-gate}
- lib/chat.ts -> lib/chat/{types,retrieve,models,answer}
- ResearchChat.tsx -> components/portal/chat/ (thread, turn, composer,
  BYOK panel, contribute form, hooks)
- SearchBox.tsx -> components/portal/search/ (popover, page form, shared)
- profile modules, lib/bottlenecks.ts, lib/participants.ts -> build/board
  and module-family files beside them
- app/page.tsx, app/markets/[slug]/page.tsx, app/policy/page.tsx -> section
  components in private _home/_sections folders

globals.css (2379 -> 664 lines) keeps tokens, base and site chrome; the
feature blocks moved to app/styles/*.css, imported from the root layout in
the order they had inside globals.css so the cascade is unchanged.
Screenshots of /, /search?q=asml, /markets/asml, the EUV bottleneck, /chat,
/notes, /atlas, /policy and /talent at 390/820/1440px are pixel-identical
to main.

The config/ corpus files stay grandfathered as data; the logic that was in
them moved to lib/ (coverage-progress.ts, participants.ts, geo.ts).

Also: the desk's "Open on" select said "Last all time"; and
INFRASTRUCTURE.md now records the hourly :17 sweep timer, the everyHours
setting that decides whether a run is due, and that 005-desk.sql is applied.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 11:22:12 -07:00

142 lines
2.6 KiB
CSS

/*
* The /chat page layout and the blocks an answer renders: markdown, the
* consent line and the submission receipt.
*/
.chat-layout {
display: grid;
grid-template-columns: minmax(0, 3fr) minmax(14rem, 1fr);
gap: 3rem;
}
.chat-mode {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.chat-mode button {
padding: 0.8rem 1rem;
border: 1px solid var(--color-border-strong);
border-radius: 0.5rem;
cursor: pointer;
font-size: 0.85rem;
}
.chat-mode button[aria-pressed='true'] {
border-color: var(--color-accent);
background: var(--color-surface-raised);
}
.research-form {
display: flex;
flex-direction: column;
gap: 0.8rem;
margin: 1.5rem 0;
max-width: 48rem;
}
.research-form textarea {
width: 100%;
resize: vertical;
line-height: 1.65;
}
.research-form button {
align-self: flex-start;
}
.research-form label {
font-size: 0.9rem;
}
.consent-line {
display: flex;
align-items: start;
gap: 0.7rem;
padding: 0.65rem 0;
line-height: 1.6;
}
.consent-line input {
margin-top: 0.3rem;
width: 1.1rem;
height: 1.1rem;
flex-shrink: 0;
}
.chat-answer {
padding: 1.5rem;
border: 1px solid var(--color-border-subtle);
border-radius: 0.75rem;
background: var(--color-surface-raised);
margin: 1.5rem 0;
line-height: 1.75;
}
.chat-answer h2 {
font: 600 1.5rem var(--font-heading);
margin-bottom: 1rem;
}
.chat-answer h3 {
margin: 1.5rem 0 0.6rem;
}
.chat-answer a {
color: var(--color-accent);
}
.chat-answer small {
display: block;
color: var(--color-fg-tertiary);
}
.chat-markdown p,
.chat-markdown ul,
.chat-markdown ol {
margin: 0.8rem 0;
}
.chat-markdown ul {
list-style: disc;
padding-left: 1.3rem;
}
.chat-markdown ol {
list-style: decimal;
padding-left: 1.3rem;
}
.chat-markdown table {
display: block;
overflow-x: auto;
border-collapse: collapse;
margin: 1rem 0;
max-width: 100%;
font-size: 0.85rem;
}
.chat-markdown td,
.chat-markdown th {
padding: 0.6rem;
border: 1px solid var(--color-border-strong);
text-align: left;
vertical-align: top;
min-width: 8rem;
}
.chat-main {
min-width: 0;
}
.chat-aside h2 {
font: 600 1.2rem var(--font-heading);
margin: 1rem 0;
}
.chat-aside button,
.chat-aside > a {
display: block;
width: 100%;
text-align: left;
padding: 0.8rem 0;
border-bottom: 1px solid var(--color-border-subtle);
color: var(--color-fg-secondary);
font-size: 0.9rem;
cursor: pointer;
}
.receipt {
overflow-wrap: anywhere;
padding: 1rem;
border: 1px solid var(--color-status-positive);
}
@media (max-width: 800px) {
.chat-layout {
grid-template-columns: 1fr;
gap: 1rem;
}
}
@media (max-width: 520px) {
.research-form button {
width: 100%;
}
}