feat(dashboard): improve business context reading and generation - #809
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
The latest updates on your projects. Learn more about Unkey Deploy
|
This comment has been minimized.
This comment has been minimized.
Greptile SummaryThis PR improves the organization business-context workflow across the dashboard, RPC, service, shared schema, and Insights worker.
Confidence Score: 5/5The PR appears safe to merge; the two previous findings are resolved and no new actionable defects were identified. The stale AI-draft path now preserves the older base revision until the user explicitly reviews the conflict, and prohibited placeholders were replaced with persistent descriptions. Both previous threads were manually resolved without explanatory replies. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Organization member] --> B[Business context dashboard]
B --> C[Manual editing]
B --> D[Generation access preflight]
D -->|Allowed| E[Queue generation]
D -->|Unavailable or no credits| C
E --> F[Read bounded same-site sources]
F --> G[Stream partial draft]
G --> H[Review current and proposed versions]
H --> I[Accept into local draft]
I --> J{Revision still current?}
C --> J
J -->|Yes| K[Save canonical profile]
J -->|No| L[Conflict review]
L --> K
Reviews (2): Last reviewed commit: "fix(dashboard): preserve stale AI draft ..." | Re-trigger Greptile |
Business context opened as raw text, exposed generation eligibility only after failure, and made generated replacements difficult to review. The page now provides Markdown previews, explicit draft review, clear generation access, and recoverable manual edits in a compact layout.
Validation: root lint and all 33 workspace typecheck tasks; all 27 pre-push tasks; 25 business-context/measurement browser regressions covering desktop/mobile loading, credits, queued/reading/streaming output, editing, saving, conflicts, history, and recovery. A regression reproduces stale AI draft acceptance and verifies revision protection survives reload until explicit conflict review. Dark-mode screenshots inspected. Brief/document geometry stays fixed through tested transitions; research access changes remain under 1px. Earlier backend validation includes 24 RPC tests, 52 generator/shared-schema tests, and 25 isolated PostgreSQL storage tests. All fixtures are synthetic and paid providers are mocked.
Based on current staging, including session-only mutations and metadata-read fixes. Related context work: #751; no dependency on an unmerged branch. No new dependencies, tables, or migrations. AI-assisted implementation and review.