Commits merged: - fix(FN-2994): gate unavailable research workflow and humanize provider labels - fix(FN-2994): polish research view form and history interactions - feat(FN-2994): complete Step 5 — document research view architecture - fix(FN-2994): align status-dot variant and hook/test conventions - fix(FN-2994): address lint and typecheck issues - test(FN-2994): cover research lifecycle actions and pending status - fix(FN-2994): polish research actions and cited reader behavior - feat(FN-2994): complete Step 3 — add lifecycle actions and task flows - fix(FN-2994): ensure research enables header overflow gate - feat(FN-2994): complete Step 2 — implement research view shell layout - feat(FN-2994): complete Step 2 — gate research navigation and view - feat(FN-2994): complete Step 1 — add research api surface and hook Files changed: docs/architecture.md | 7 +- docs/dashboard-guide.md | 21 ++ packages/dashboard/app/App.tsx | 11 +- packages/dashboard/app/api/legacy.ts | 143 ++++----- packages/dashboard/app/components/Header.tsx | 29 +- packages/dashboard/app/components/MobileNavBar.tsx | 22 +- packages/dashboard/app/components/ResearchView.css | 247 +++++++++------ packages/dashboard/app/components/ResearchView.tsx | 347 ++++++++++++++------- .../app/components/__tests__/ResearchView.test.tsx | 183 ++++++----- .../app/hooks/__tests__/useResearch.test.ts | 66 ++++ packages/dashboard/app/hooks/useResearch.ts | 162 ++++++++++ packages/dashboard/app/research-types.ts | 43 +++ packages/dashboard/app/styles.css | 4 + .../src/__tests__/research-routes.test.ts | 65 ++++ packages/dashboard/src/research-routes.ts | 195 ++++++++++-- 15 files changed, 1111 insertions(+), 434 deletions(-) Fusion-Task-Id: FN-2994
227 lines
4.2 KiB
CSS
227 lines
4.2 KiB
CSS
.research-view {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-md);
|
|
height: 100%;
|
|
min-height: 0;
|
|
padding: var(--space-lg);
|
|
}
|
|
|
|
.research-view__header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.research-view__title {
|
|
margin: 0;
|
|
}
|
|
|
|
.research-view__subtitle {
|
|
margin: var(--space-xs) 0 0;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.research-view__layout {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
|
|
gap: var(--space-md);
|
|
min-height: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.research-view__sidebar,
|
|
.research-view__reader {
|
|
padding: var(--space-md);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-md);
|
|
min-height: 0;
|
|
}
|
|
|
|
.research-view__form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.research-view__form .form-group,
|
|
.research-view__history-header.form-group,
|
|
.research-view__actions .form-group {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.research-view__textarea {
|
|
min-height: calc(var(--space-2xl) * 3);
|
|
resize: vertical;
|
|
}
|
|
|
|
.research-view__providers {
|
|
display: grid;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.research-view__history-header {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.research-view__history-search-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.research-view__history {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
overflow: auto;
|
|
}
|
|
|
|
.research-view__history-item {
|
|
border: var(--btn-border-width) solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
text-align: left;
|
|
padding: var(--space-sm);
|
|
min-height: calc(var(--space-lg) * 2 + var(--space-xs));
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
gap: var(--space-xs);
|
|
transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
|
|
}
|
|
|
|
.research-view__history-item:hover {
|
|
background: var(--card-hover);
|
|
border-color: var(--todo);
|
|
}
|
|
|
|
.research-view__history-item:focus-visible {
|
|
outline: none;
|
|
border-color: var(--todo);
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.research-view__history-item--active {
|
|
border-color: var(--todo);
|
|
box-shadow: var(--focus-ring);
|
|
}
|
|
|
|
.research-view__status-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.research-view__run-title,
|
|
.research-view__run-query,
|
|
.research-view__run-summary {
|
|
margin: 0;
|
|
}
|
|
|
|
.research-view__run-query {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.research-view__actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-xs);
|
|
margin-top: var(--space-sm);
|
|
}
|
|
|
|
.research-view__citations {
|
|
margin: var(--space-sm) 0 0;
|
|
padding-left: var(--space-lg);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.research-view__citations a {
|
|
color: var(--text);
|
|
}
|
|
|
|
.research-view__error {
|
|
color: var(--color-error);
|
|
}
|
|
|
|
.research-view__findings {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.research-view__finding {
|
|
padding: var(--space-sm);
|
|
}
|
|
|
|
.research-view__finding h4,
|
|
.research-view__finding p {
|
|
margin: 0;
|
|
}
|
|
|
|
.research-view__events {
|
|
margin: var(--space-sm) 0 0;
|
|
padding-left: var(--space-lg);
|
|
}
|
|
|
|
|
|
.research-view__stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.research-view__stat-card {
|
|
border: var(--btn-border-width) solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: var(--space-sm);
|
|
background: var(--surface);
|
|
}
|
|
|
|
.research-view__stat-label {
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.research-view__stat-value {
|
|
font-family: var(--font-mono);
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.research-view__state--error {
|
|
border-color: var(--color-error);
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.research-view {
|
|
padding: var(--space-md);
|
|
}
|
|
|
|
.research-view__layout {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.research-view__header {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.research-view__stats {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.research-view__history-item {
|
|
min-height: calc(var(--space-lg) * 2 + var(--space-sm));
|
|
}
|
|
}
|