fix(dashboard): simplify business context editing and retries - #811
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
|
Greptile SummaryThis PR streamlines business-context editing and generation retries while consolidating mutation-driven query-cache updates.
Confidence Score: 5/5The PR appears safe to merge with no outstanding correctness, security, or repository-rule issues identified. The mutation callbacks preserve canonical query state, retry inputs are restored from persisted generation data, team edits are compared field by field, and both previous rule findings are resolved in the current code. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Load business context] --> B{Saved brief exists?}
B -->|No and editable| C[Open Edit mode]
B -->|Yes| D[Open Preview mode]
A --> E{Failed generation exists?}
E -->|Yes| F[Restore website and source URLs]
F --> G[Retry generation]
G --> H[Mutation succeeds]
H --> I[Update canonical query cache]
G --> J[Mutation fails]
J --> K[Preserve retry inputs]
Reviews (3): Last reviewed commit: "test(dashboard): guard business context ..." | Re-trigger Greptile |
An empty business brief now opens directly in Edit, and refreshing after a failed generation restores the submitted website and research URLs so retrying targets the same inputs. Team edits are compared field by field, fixing a case where moving text into the success field incorrectly left Save disabled.
Consolidates repeated query updates using TanStack mutation callbacks, derives generation access types from the RPC contract, reuses generation validation, and removes redundant empty-state/source copy. Existing draft recovery, revision checks, explicit AI acceptance, and durable error dismissal stay covered. No new dependencies; production code is 23 lines smaller.
Validation: repository lint, all 33 type-check tasks, and repository tests pass. Three browser regressions reproduced the issues before the fixes. All 32 business-context and measurement-plan browser regressions pass with zero retries, covering desktop/mobile layout, streaming, draft recovery, conflicts, and credit-gated states. Independent code review found no actionable issues.
Scope: business context cleanup only, based on current staging after #810; no unmerged dependencies or known active overlap.