Skip to content

feat(dashboard): show business research results and focused follow-ups - #833

Merged
izadoesdev merged 6 commits into
stagingfrom
codex/business-context-research-clarity
Sep 18, 2026
Merged

izadoesdev merged 6 commits into
stagingfrom
codex/business-context-research-clarity

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Business-context research now shows the pages it read, pages it could not read, and failures in page discovery. Those results stream into a compact report and survive saving and history restoration, separately from citations supporting the brief. Failed secondary reads and discovery errors can still produce a brief from verified pages; cancellation, source boundaries, billing settlement, and the seven-page limit stay enforced.

The agent can leave up to three focused questions for missing team context. Questions appear beside the existing fields, answers recover across reload, and explicit saving clears answered questions without implicitly adopting the AI brief. Starting a new run hides the previous proposal; completion no longer waits for a background refresh; failures remain visible in the focused draft view on mobile. Explicitly choosing a legacy draft never attaches another run's report or questions.

Scope: organization business-context schema/storage, active API generation, and dashboard page. No new dependency, endpoint, queue, or database migration. Independent of #751; no changes to its business-memory or Insights surface.

Validation:

  • Root lint; 33 workspace typecheck tasks; 29 unit-test tasks, including 69 generator cases.
  • 30 isolated PostgreSQL cases and 40 business-context/measurement Playwright cases.
  • Production dashboard build with E2E routes disabled; four additional desktop/mobile visual checks, with no page errors, overflow, lost focus, or input movement while answering.
  • An additional API-only strict TypeScript probe matches staging's existing dependency diagnostics exactly; no new diagnostics. The required repository typecheck command passes.

Provider/model tests use synthetic fixtures. Live model quality has not been checked in this iteration.

AI-assisted implementation and review. Maintainer contribution.

@vercel

vercel Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dashboard Ready Ready Preview Sep 18, 2026 12:02pm UTC
databuddy-status Ready Ready Preview Sep 18, 2026 12:02pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
documentation Skipped Skipped Sep 18, 2026 12:02pm UTC

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c561e0cf-57e5-42b7-9445-8bfaf526c7d9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@unkey-deploy

unkey-deploy Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Unkey Deploy

Name Status Preview Inspect Updated (UTC)
links (preview) Ready Visit Preview Inspect Sep 18, 2026 12:01pm

@izadoesdev
izadoesdev marked this pull request as ready for review September 18, 2026 11:52
@izadoesdev

Copy link
Copy Markdown
Member Author

@greptileai Please review the final implementation on e1c23a4, including streaming report persistence, degraded reads/discovery, explicit-draft provenance, follow-up questions, and the dashboard state transitions. Local lint, required types/unit suites, PostgreSQL tests, browser regressions, visual QA, and production build are complete; validation and limitations are in the PR description.

@greptile-apps

greptile-apps Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The final head appears safe to merge; no actionable new issue or outstanding previous finding remains.

Summary

This PR adds durable visibility into business-context research and focused follow-up questions while preserving generation boundaries, cancellation, billing, and explicit draft adoption.

  • Streams and stores successful page reads, failed reads, and discovery failures separately from brief citations.
  • Generates up to three focused questions for unanswered team-context fields and clears answered questions on explicit save.
  • Updates the dashboard to display active, failed, saved, and restored research reports without leaking metadata between generations.
  • Adds API, schema, PostgreSQL integration, and desktop/mobile browser coverage.
  • The final-head correction removes the previously reported postfix non-null assertions by strengthening the fixture return type and adding explicit guards.

Diagram

sequenceDiagram
    participant UI as Dashboard
    participant API as Business-context generator
    participant Web as Website reader/search
    participant Store as Organization context storage

    UI->>API: Start generation
    API->>Store: Mark running with empty research report
    API->>Web: Read homepage and selected pages
    Web-->>API: Read and failure outcomes
    API->>Store: Stream bounded research updates
    API->>Web: Discover additional pages
    alt Discovery unavailable
        API->>Store: Record discoveryFailed
    end
    API->>API: Generate brief, citations, and focused questions
    alt Generation succeeds
        API->>Store: Save ready draft and research
        Store-->>UI: Stream completed proposal and report
    else Generation fails
        API->>Store: Preserve partial research with failure
        Store-->>UI: Stream failure and partial report
    end
    UI->>Store: Explicitly save brief/team answers
    Store->>Store: Persist report and remove answered questions
Loading

Reviews (2) · Last reviewed commit: "test(dashboard): guard business context ..."

Comment thread apps/dashboard/test/e2e/specs/regressions/business-context.spec.ts
@izadoesdev

Copy link
Copy Markdown
Member Author

@greptileai review this PR on final head 4390bd6. The non-null assertion finding is fixed using a guaranteed fixture return type and explicit guards; the 40 browser cases, lint, and types passed again. Please verify the final head before merge.

@izadoesdev
izadoesdev merged commit d90b992 into staging Sep 18, 2026
22 checks passed
@izadoesdev
izadoesdev deleted the codex/business-context-research-clarity branch September 18, 2026 12:06

This branch was successfully deployed

3 active and 1 inactive deployments
Preview – dashboard — 4390bd62 Deployed Sep 18, 2026 by vercel[bot]
Preview – databuddy-status — 4390bd62 Deployed Sep 18, 2026 by vercel[bot]
links - preview — 4390bd62 Deployed Sep 18, 2026 by unkey-deploy[bot]
Preview – documentation — 4390bd62 Deployed Sep 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant