WIP: Project Weight Reduction 2.2 UI refactor demo#2
Draft
exactlyallan wants to merge 46 commits into
Draft
Conversation
…A-AI-Blueprints#209) * fix: keep commas inside URL paths in citation source extractor The generic URL extractor in citation_verification.py excluded ``,`` from its character class, which truncated real URLs whose paths legitimately contain commas — most commonly geo coordinates such as ``https://weathercams.faa.gov/map/-122.31167,47.22287,10/airport/SEA/...``. That URL was registered as ``https://weathercams.faa.gov/map/-122.31167``. When the LLM cited the full URL in the report, the verifier compared full vs. truncated, didn't find a match, and silently removed the citation as ``url_not_in_registry`` — even though the source had been retrieved by the tool call. Drop ``,`` from the regex exclusion class. The existing trailing-punctuation ``rstrip(".,;)")`` continues to strip a comma when it actually is sentence punctuation. ``]`` stays excluded so markdown link brackets still terminate the URL match. Add three regression tests covering: comma in URL path, trailing comma still trimmed, and markdown bracket still terminates. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ajay Thorve <athorve@nvidia.com> * fix: also strip ``]`` and ``>`` from captured URLs Fold the verification-side counterpart of the comma fix into the same change. When the LLM emits a citation as a Markdown-bracketed URL like ``[1] Title - [https://valid.com/article1]`` or an angle-bracket autolink ``<https://valid.com/article1>``, ``_URL_IN_LINE_RE`` matched ``https://valid.com/article1]`` (or ``...>``) and the trailing-punct ``rstrip(".,;)")`` left the bracket attached. The trailing ``]`` then prevented the URL from resolving against the registry, so the citation was silently dropped. Centralize the trim set as ``_URL_TRIM_CHARS = ".,;)]>"`` and apply at all five capture sites (registration, body and reference verification, sanitize). Two regression tests cover ``[url]`` and ``<url>`` forms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ajay Thorve <athorve@nvidia.com> * fix: also drop comma exclusion from sanitize_report's URL regexes Greptile review on PR NVIDIA-AI-Blueprints#209 caught a sibling case: ``_BARE_URL_RE`` and ``_BODY_URL_RE`` (used by ``sanitize_report``) still excluded ``,`` from their character class. A bare comma-path URL in the report body would be truncated at the first comma — only the prefix replaced with ``[N]``, leaving ``,47.22287,10/...`` as dangling text in the cleaned report. Apply the same regex fix to both, and add a regression test using the FAA cam URL from the original repro. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ajay Thorve <athorve@nvidia.com> --------- Signed-off-by: Ajay Thorve <athorve@nvidia.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: bump NeMo Agent Toolkit pin to 1.6.0
- pyproject.toml: nvidia-nat, nvidia-nat-core, nvidia-nat-eval pinned to
1.6.0; drop the unused `weave` extra; add nvidia-nat-profiler==1.6.0.
The profiler package was carved out of nvidia-nat-eval in 1.6 and now
owns the LangChain callback auto-attach (LangchainProfilerHandler);
without it, LLM_*/TOOL_* IntermediateStep events stop reaching the
FastAPI step_adaptor and the SSE trajectory hierarchy collapses to
function-only events. workflow_builder.py silently no-ops the
auto-attach when the import fails, which made this footgunny — see
the 1.6 migration guide entry on the eval/profiler split.
- frontends/benchmarks/deepsearch_qa pin: nvidia-nat-eval==1.6.0.
- frontends/benchmarks/{freshqa,deepsearch_qa}: EvalOutput and
EvalOutputItem moved from nat.data_models.evaluator to
nat.plugins.eval.data_models.evaluator_io in NAT 1.6; update both
benchmark plugins so their entry points load cleanly.
Verification: import smoke (11/11), pytest (906 passed, 2 skipped, 1
pre-existing collection error), `nat info components` registers AIQ
functions cleanly, /chat/stream SSE produces the full nested trajectory
(Function + LLM + Tool events) for "weather in seattle".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
* fix: raise freshqa-eval lower bound on nvidia-nat-eval to 1.6.0
Greptile review on PR NVIDIA-AI-Blueprints#208 caught that the freshqa benchmark plugin's
``evaluator.py`` was updated to import ``EvalOutput``/``EvalOutputItem``
from ``nat.plugins.eval.data_models.evaluator_io`` (the 1.6 location)
while its ``pyproject.toml`` still allowed ``nvidia-nat-eval>=1.5.0``.
The workspace lock file masks the issue inside this repo, but any
out-of-workspace install resolving against 1.5.x would ImportError at
startup. Match the deepsearch_qa pin's lower bound of 1.6.0.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
* consistent version pins for nat
---------
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…AI-Blueprints#200) Expose DASK_MEMORY_LIMIT, DASK_LIFETIME, and DASK_LIFETIME_RESTART as commented-out examples in both docker-compose.yaml and the helm values.yaml so operators can discover and opt into them without reading the entrypoint source. Default behavior is unchanged since all three are commented out. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restore the UI local CI entrypoint and add Project Weight Reduction contract fixtures, MSW handlers, and a table-driven capability matrix with tests. These guardrails give later UI refactor branches typed API shapes and selector behavior to build against.
Document the NAT 1.6 baseline for API and MCP guidance, remove stale NAT 1.4/1.5 release notes, and add a repository-level pytest guard that checks root, benchmark, and lockfile NAT package pins. Validation: .venv/bin/python -m pytest tests/test_nat_foundation.py -q; .venv/bin/python -m ruff check tests/test_nat_foundation.py
Add a structured /v1/research/submit endpoint that invokes the backend workflow so shallow/deep routing stays server-owned, plus a visible-job listing endpoint backed by persisted job context metadata. Rename proof-of-concept UI contracts and mocks from pwr-* to research-job-* so the branch namespace does not leak into durable source names. Validation: .venv/bin/python -m pytest frontends/aiq_api/tests -q; .venv/bin/python -m ruff check frontends/aiq_api/src/aiq_api/jobs/context.py frontends/aiq_api/src/aiq_api/routes/jobs.py frontends/aiq_api/src/aiq_api/auth/middleware.py frontends/aiq_api/tests/test_job_context.py frontends/aiq_api/tests/test_research_routes.py; tsc --noEmit; eslint targeted API files; vitest targeted research job contract tests.
Add a frontend research submit client with structured boundary-aware errors, a chat hook that preserves the existing shallow-answer and deep-research job handoff behavior, and InputArea wiring so normal sends use the backend-routed HTTP endpoint instead of WebSocket send. Validation: PATH=/Users/aenemark/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/aenemark/Desktop/Projects/AIQv2/aiq/node_modules/.bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/usr/local/MacGPG2/bin:/usr/local/go/bin:/Users/aenemark/.codex/tmp/arg0/codex-arg0i181Gt:/Applications/Codex.app/Contents/Resources vitest --no-watch src/adapters/api/research-job-contracts.spec.ts src/adapters/api/research-job-msw-handlers.spec.ts src/adapters/api/research-submit-client.spec.ts src/features/chat/hooks/use-research-submit.spec.ts src/features/layout/components/InputArea.spec.tsx; PATH=/Users/aenemark/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/aenemark/Desktop/Projects/AIQv2/aiq/node_modules/.bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/usr/local/MacGPG2/bin:/usr/local/go/bin:/Users/aenemark/.codex/tmp/arg0/codex-arg0i181Gt:/Applications/Codex.app/Contents/Resources tsc --noEmit; PATH=/Users/aenemark/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/aenemark/Desktop/Projects/AIQv2/aiq/node_modules/.bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/usr/local/MacGPG2/bin:/usr/local/go/bin:/Users/aenemark/.codex/tmp/arg0/codex-arg0i181Gt:/Applications/Codex.app/Contents/Resources eslint src/adapters/api/research-submit-client.ts src/adapters/api/research-submit-client.spec.ts src/features/chat/hooks/use-research-submit.ts src/features/chat/hooks/use-research-submit.spec.ts src/features/layout/components/InputArea.tsx src/features/layout/components/InputArea.spec.tsx src/adapters/api/index.ts src/features/chat/hooks/index.ts
Scope submit responses to the originating conversation so delayed shallow answers, async job metadata, and error cards cannot mutate the currently selected session by accident. Remove InputArea's legacy WebSocket/HITL auto-connect path and preserve backend status details when the research submit proxy receives non-JSON responses. Validation: vitest --no-watch src/app/api/research/submit/route.spec.ts src/features/chat/hooks/use-research-submit.spec.ts src/features/layout/components/InputArea.spec.tsx src/adapters/api/research-submit-client.spec.ts; eslint targeted submit/InputArea/store files; tsc --noEmit; next build.
Introduce pure state helpers for the project weight reduction job UI: compact status polling across visible jobs, selected-job-only detail hydration, selected active-job live stream targeting, submit request binding, and stale poll snapshot guards. Add scenario tests for concurrent active jobs, submit-before-job-id binding, shallow response scoping, selection-change detail routing, missing selected jobs, and terminal-state regression protection. Validation: vitest --no-watch src/features/jobs/state/multi-job-flow.spec.ts src/features/jobs/state/capability-matrix.spec.ts; eslint targeted jobs state files; tsc --noEmit.
Add job capability selectors on top of the matrix and cover submitted, stale, interrupted, unavailable, anonymous, and completed-job states explicitly. Use the derived capabilities in InputArea for prompt and file-upload disabled state while keeping source/file panel access inspectable. Validation: vitest --no-watch src/features/jobs/state/job-capability-selectors.spec.ts src/features/jobs/state/capability-matrix.spec.ts src/features/layout/components/InputArea.spec.tsx; eslint targeted jobs/InputArea files; tsc --noEmit.
Add a typed research jobs client and polling hook, render backend-owned jobs in the sessions panel with local-session fallback, and create lightweight chat shells when a backend job is selected. Validation: vitest --no-watch --run src/features/chat/store.spec.ts src/adapters/api/research-jobs-client.spec.ts src/features/layout/components/SessionsPanel.spec.tsx; tsc --noEmit; targeted eslint
Add explicit knowledge-layer collection helpers, route submit and upload paths through collection naming, and bind data-source/file controls to selected job capabilities so terminal or errored jobs do not mutate source context. Validation: vitest --no-watch --run src/features/documents/research-collections.spec.ts src/features/chat/hooks/use-research-submit.spec.ts src/features/documents/hooks/use-file-upload.spec.ts src/features/layout/components/InputArea.spec.tsx src/features/layout/components/FileSourcesTab.spec.tsx src/features/layout/components/DataSourcesPanel.spec.tsx src/features/jobs/state/capability-matrix.spec.ts; tsc --noEmit; targeted eslint
Accept nullable backend job-list display fields while normalizing them to undefined for UI consumers, and make selected-job capability derivation tolerate ISO string timestamps restored from localStorage. Validation: TZ=UTC node node_modules/.bin/vitest --no-watch --run src/adapters/api/research-jobs-client.spec.ts src/features/jobs/state/job-capability-selectors.spec.ts; node node_modules/.bin/tsc --noEmit; node node_modules/.bin/eslint src/adapters/api/research-job-contracts.ts src/adapters/api/research-jobs-client.spec.ts src/features/jobs/state/job-capability-selectors.ts src/features/jobs/state/job-capability-selectors.spec.ts
Keep interaction sessions tab-local while persisting only conversations anchored to active, completed, failed, or interrupted deep-research report jobs. Filter backend async-job rows to report-level research jobs before rendering the sessions panel so implementation/sub-agent jobs do not replace chat sessions. Validation: TZ=UTC node node_modules/.bin/vitest --no-watch --run src/features/chat/store.spec.ts src/features/chat/lib/prune-message-for-storage.spec.ts src/features/chat/lib/storage-manager.spec.ts src/features/chat/lib/session-activity.spec.ts src/features/jobs/state/report-job-scope.spec.ts src/features/chat/lib/report-session-persistence.spec.ts src/features/layout/components/SessionsPanel.spec.tsx; node node_modules/.bin/tsc --noEmit; node node_modules/.bin/eslint src/features/jobs/state/report-job-scope.ts src/features/jobs/state/report-job-scope.spec.ts src/features/jobs/state/index.ts src/features/chat/lib/report-session-persistence.ts src/features/chat/lib/report-session-persistence.spec.ts src/features/chat/store.ts src/features/chat/store.spec.ts src/features/layout/components/SessionsPanel.tsx src/features/layout/components/SessionsPanel.spec.tsx
Clear the shallow-streaming navigation blocker after HTTP submit hands off to an async deep-research job, and link local interaction sessions to their backend report job so the sessions panel folds backend metadata into the owning local session instead of rendering a duplicate job card. Validation: TZ=UTC node node_modules/.bin/vitest --no-watch --run src/features/chat/store.spec.ts src/features/chat/hooks/use-research-submit.spec.ts src/features/chat/lib/session-activity.spec.ts src/features/layout/components/SessionsPanel.spec.tsx; node node_modules/.bin/tsc --noEmit; node node_modules/.bin/eslint src/features/chat/hooks/use-research-submit.ts src/features/chat/hooks/use-research-submit.spec.ts src/features/chat/lib/session-activity.ts src/features/chat/lib/session-activity.spec.ts src/features/layout/components/SessionsPanel.tsx src/features/layout/components/SessionsPanel.spec.tsx src/features/layout/components/MainLayout.tsx
Remove the unused frontend WebSocket client, hook, recovery helper, NAT schema exports, and gateway /websocket backend proxy. Keep framework websocket upgrades for Next.js internals only and update stale transport comments/tests. Validation: TZ=UTC bundled-node vitest --no-watch --run use-chat use-current-session-busy SessionsPanel store transport-auth-signals rum; bundled-node tsc --noEmit; bundled-node eslint targeted files; bundled-node --check server.js; next build outside sandbox.
Delete the dead useChat hook, chat-client adapter, OpenAI-compatible schema layer, and legacy /api/chat and /api/generate proxy routes. Keep generate-pdf untouched and leave active deep-research SSE for a dedicated polling-replacement slice. Validation: TZ=UTC bundled-node vitest --no-watch --run InputArea rum research-submit-client store; bundled-node tsc --noEmit; bundled-node eslint targeted files; next build outside sandbox.
Delete AgentPrompt and PlanTab, remove the Plan research-panel tab, and stop using pending HITL state to block session navigation or current-session busy checks. Leave deeper persisted store fields for a later state-model migration rather than mixing storage-shape changes into the component prune. Validation: TZ=UTC bundled-node vitest --no-watch --run ChatArea ChatThinking ResearchPanel SessionsPanel MainLayout layout-store use-current-session-busy AppBar ExportFooter; bundled-node tsc --noEmit; bundled-node eslint targeted files; next build outside sandbox.
Collapse the research panel to Research, Citations, and Artifacts; move secondary AppBar actions into the user menu; add a compact prompt status strip; and make research sessions easier to scan with backend job status and report hints. Active research entry points now open Artifacts for progress, while completed report entry points open Research. The new Artifacts tab summarizes report availability, generated files, task progress, and tool activity without exposing raw token streams. Validation: npm test -- --run; npm run type-check; npm run lint; npm run build
Start the 2.2 project weight reduction UI rough-in around a persistent application shell instead of the prior overlay-heavy layout. Key changes: - Move the left research sessions surface into a persistent compact/expanded rail with stable controls, grouped session age buckets, active/completed/temp/error icons, inline edit/delete controls, and report/job-aware session selection. - Replace the old right-side panel model with a Deep Research rail and drawer that exposes Data Sources, Citations, Research, Artifacts, and Thinking as fixed nav destinations. - Simplify panel content hierarchy: data sources now starts with file attachments, citations/artifacts/thinking remove nested button-group navigation, and thinking focuses on thoughts. - Restyle the prompt area as a floating rounded-xl card with a state-derived status row, backend-job stop action, compact source/file counters, and no prompt-local attach button or drag/drop upload path. - Move user settings into the AppBar account popover and remove the SettingsPanel surface entirely. - Add branded icon aliases needed by the rough-in rails, session states, prompt status, and stop action. - Treat backend failure/interrupted job statuses as domain job states in the deep research client rather than adapter-level transport errors, with regression coverage. This is still intentionally a rough-in pass: visual polish and final UX details remain follow-up work, but the layout, state boundaries, and component hierarchy are now in the intended direction for the refocused UI. Validation: - npm test: 83 files passed, 1188 tests passed, 1 skipped. - npm run type-check: passed. - npm run lint: passed with existing warnings only, 0 errors. - npm run build: passed; build still reports existing CSS optimizer @Property warnings.
Allow the open Deep Research drawer to resize per mounted UI instance by dragging its left edge. The right nav rail stays fixed and the chat column continues to resize from the panel container width. The resize state is intentionally component-local: it resets on refresh and does not add layout-store, localStorage, backend, or job-state surface area. Validation: - npm test -- src/features/layout/components/ResearchPanel.spec.tsx - npm run type-check - npm run lint: passed with existing warnings only, 0 errors.
Add a centered three-dot grip affordance to the Deep Research drawer resize separator so the draggable border is discoverable without changing resize behavior. Validation: npm test -- src/features/layout/components/ResearchPanel.spec.tsx; npm run type-check; npm run lint passed with existing warnings only.
Keep session status icons fixed between compact and expanded session panel modes, remove icon backgrounds, and apply theme-safe status colors for active, complete, and temporary sessions. Move the research drawer resize grip inside the panel border with a small bounded affordance. Validation: npm test -- src/features/layout/components/SessionsPanel.spec.tsx; npm test -- src/features/layout/components/ResearchPanel.spec.tsx; npm run type-check; npm run lint passed with existing warnings only.
Move conversation error messages out of the chat transcript and render them in a dismissible KUI header banner stack above the scrollable message area. Validation: npm test -- src/features/layout/components/ChatArea.spec.tsx; npm run type-check; npm run lint passed with existing warnings only.
Replace the deep-research EventSource client with REST polling over status, state, and report endpoints. Keep job-state hydration shared between active polling and historical job loading, and make removed stream routes fail with a clear HTTP response. Remove backend SSE stream routes, connection-manager shutdown handling, and NAT browser WebSocket route exposure for the AIQ API proof of concept. Preserve persisted job events as backend state snapshots for polling consumers. Validation: npm run lint; npm run type-check; npm test -- src/features/chat/hooks/use-deep-research.spec.ts src/features/chat/hooks/use-load-job-data.spec.ts src/adapters/api/deep-research-client.spec.ts 'src/app/api/jobs/async/[...path]/route.spec.ts' src/features/chat/lib/transport-auth-signals.spec.ts src/features/chat/hooks/use-current-session-busy.spec.ts; npm run build; .venv/bin/python -m ruff check frontends/aiq_api/src/aiq_api frontends/aiq_api/tests/test_auth.py tests/aiq_agent/fastapi_extensions/test_deep_research.py tests/aiq_agent/jobs/test_runner.py; .venv/bin/python -m pytest frontends/aiq_api/tests/test_auth.py tests/aiq_agent/fastapi_extensions/test_deep_research.py tests/aiq_agent/jobs/test_runner.py -q
Project persisted job events into compact state for polling clients, including LLM thinking steps, current activity, and reliable tool status. Hydrate the UI Thinking tab and prompt status from that state without reopening SSE or WebSocket transports. Also add run_id metadata to callback events and update stale docs that referenced the removed SSE stream route. Validation: .venv/bin/python -m pytest tests/aiq_agent/fastapi_extensions/test_deep_research.py tests/aiq_agent/jobs/test_runner.py -q; .venv/bin/python -m ruff check frontends/aiq_api/src/aiq_api/routes/jobs.py frontends/aiq_api/src/aiq_api/jobs/callbacks.py tests/aiq_agent/fastapi_extensions/test_deep_research.py tests/aiq_agent/jobs/test_runner.py; node node_modules/.bin/vitest --no-watch src/features/chat/lib/deep-research-job-state.spec.ts src/features/chat/hooks/use-deep-research.spec.ts src/features/chat/hooks/use-load-job-data.spec.ts src/features/layout/components/InputArea.spec.tsx; node node_modules/.bin/tsc --noEmit; node node_modules/eslint/bin/eslint.js <touched frontend files>
Centralize prompt disabled state, status strip copy, stop control availability, and source/file counter enablement in a pure selector derived from the backend job capability matrix. Wire the prompt area through the selector and add matrix coverage for unavailable data sources so UI controls do not keep duplicating local job-state logic. Validation: node node_modules/.bin/vitest --no-watch src/features/jobs/state src/features/layout/components/DataSourcesPanel.spec.tsx src/features/layout/components/FileSourcesTab.spec.tsx src/features/layout/components/InputArea.spec.tsx; node node_modules/typescript/bin/tsc --noEmit; node node_modules/eslint/bin/eslint.js src --ext .ts,.tsx
Add a small Node generator that renders the runtime capability matrix and research UI state projection into Markdown tables for PR review and agent orientation. The generated doc includes canonical match conditions, capability outputs, prompt bar behavior, side panel behavior, and a curated scenario checklist for long-running workflow edge cases. Validation: node scripts/generate-state-matrix-doc.cjs --check; node node_modules/.bin/vitest --no-watch src/features/jobs/state; node node_modules/typescript/bin/tsc --noEmit; node node_modules/eslint/bin/eslint.js src --ext .ts,.tsx; node --check scripts/generate-state-matrix-doc.cjs
Add a UI docs entry point for the research state matrix, include the update process in the generated Markdown, and link the matrix from the main UI README. Wire the generated-doc freshness check into the local UI CI flow so matrix changes fail when the Markdown table is stale. Validation: env PATH=/Users/aenemark/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/aenemark/Desktop/Projects/AIQv2/aiq/node_modules/.bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/usr/local/MacGPG2/bin:/usr/local/go/bin:/Users/aenemark/.codex/tmp/arg0/codex-arg0Vnldp1:/Applications/Codex.app/Contents/Resources ./scripts/ci-check.sh --quick
Load report content when opening the Research rail tab for a selected completed backend job, while guarding against active jobs that are not report-ready. Treat the Thinking rail tab as selected-job state hydration so LLM thought traces can load from backend job-state snapshots without SSE. Validation: node node_modules/.bin/vitest --no-watch src/features/layout/components/ResearchPanel.spec.tsx src/features/chat/hooks/use-load-job-data.spec.ts src/features/chat/hooks/use-deep-research.spec.ts src/features/jobs/state; node node_modules/typescript/bin/tsc --noEmit; node node_modules/eslint/bin/eslint.js src --ext .ts,.tsx
Tighten expanded session panel spacing against the icon rail, keep the rail divider mounted in both compact and expanded states, and replace metadata pills with one state line per session. Make the AppBar brand act as a guarded new-session button wired to the existing MainLayout new-session handler. Validation: node node_modules/.bin/vitest --no-watch src/features/layout/components/SessionsPanel.spec.tsx src/features/layout/components/AppBar.spec.tsx src/features/layout/components/MainLayout.spec.tsx; node node_modules/typescript/bin/tsc --noEmit; node node_modules/eslint/bin/eslint.js src/features/layout/components/SessionsPanel.tsx src/features/layout/components/SessionsPanel.spec.tsx src/features/layout/components/AppBar.tsx src/features/layout/components/AppBar.spec.tsx src/features/layout/components/MainLayout.tsx
Make the AppBar brand and expanded new-session label read as clickable controls, differentiate selected session titles from inactive titles, and color session state labels to match their status icons. Add footer padding under the session persistence note so it does not sit flush against the bottom of the panel. Validation: node node_modules/.bin/vitest --no-watch src/features/layout/components/SessionsPanel.spec.tsx src/features/layout/components/AppBar.spec.tsx src/features/layout/components/MainLayout.spec.tsx; node node_modules/typescript/bin/tsc --noEmit; node node_modules/eslint/bin/eslint.js src/features/layout/components/SessionsPanel.tsx src/features/layout/components/SessionsPanel.spec.tsx src/features/layout/components/AppBar.tsx src/features/layout/components/AppBar.spec.tsx src/features/layout/components/MainLayout.tsx
Add high-level deep research job state helpers, update the generated UI state matrix docs, and wire the prompt/session surfaces to derived active, error, interrupted, and completed states. Improve backend job hydration, draft report rendering from markdown artifacts, persistent status banners, current-task popover behavior, and stop/status affordances for shallow and deep research flows. Polish the session and research panels by tightening icon/status treatments, making artifacts scroll cleanly, simplifying data-source/citation/thinking empty states, and removing redundant summary cards and placeholder copy. Validation: node node_modules/typescript/bin/tsc --noEmit; node scripts/generate-state-matrix-doc.cjs --check; node node_modules/vitest/vitest.mjs run changed specs (209 passed); node node_modules/eslint/bin/eslint.js changed files (0 errors, existing no-explicit-any warnings in specs); node node_modules/prettier/bin/prettier.cjs --check changed source/spec files.
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.
WIP Demo Branch
This is a draft PR for the Project Weight Reduction proof-of-concept work targeting the AIQ 2.2 UI/API refactor direction.
This PR is intentionally opened against
exactlyallan/aiq:develop, not the upstream NVIDIA repo. It is a WIP demo branch meant to make the current refactor reviewable, runnable, and easy to split into staged PRs later.Branch Structure
Aggregate branch:
pwr/2.2-dev- demo/integration branch for the full proof of conceptRelated slice branches rolled into, or represented by, this aggregate branch:
pwr/nat-1.6-foundation- NAT 1.6 baseline and package/version guardrailspwr/quality-gates- UI/backend safety checks and branch validation scaffoldingpwr/job-context-api- backend job context/listing/report API foundationpwr/http-chat-submit- HTTP submit path replacing UI WebSocket submit behaviorpwr/http-submit-review-fixes- scoped submit/error handling fixes from reviewpwr/session-scope-model- frontend session/job scoping modelpwr/multi-job-flow-model- concurrent async job state model and selectorspwr/ui-state-model- capability/state matrix foundation for UI disabled/error statespwr/job-sessions-panel- backend job-backed session panel behaviorpwr/rag-data-source-flow- RAG file/data-source/collection submit flowpwr/session-panel-runtime-fixes- runtime fixes from local browser testingpwr/session-job-dedupe- active report job/session dedupe behaviorpwr/component-prune- initial legacy WebSocket/HITL/component removalpwr/ui-refocus-rough-in- rough UI shell and design pass for the refocused layoutWork Done
Work To Do
Review Guidance
Please treat this as a WIP demo branch, not a final merge candidate.
Suggested review order:
pwr/job-context-api,pwr/http-chat-submit,pwr/http-submit-review-fixes.pwr/session-scope-model,pwr/multi-job-flow-model,pwr/ui-state-model.pwr/job-sessions-panel,pwr/session-job-dedupe,pwr/rag-data-source-flow.pwr/component-prune,pwr/ui-refocus-rough-in.pwr/2.2-dev.Validation
Latest focused local checks:
npm test -- src/features/layout/components/SessionsPanel.spec.tsxnpm test -- src/features/layout/components/ResearchPanel.spec.tsxnpm run type-checknpm run lint- passed with existing warnings onlyEarlier branch validation included broader UI test/build passes before the latest design polish.