ECHO-569 Add refine functionality to the participant portal#363
ECHO-569 Add refine functionality to the participant portal#363
Conversation
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on December 5
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| ProjectPortalEditorComponent, | ||
| (prevProps, nextProps) => { | ||
| // Only re-render if the project ID has changed | ||
| // Re-render if project ID or verification topics have changed |
There was a problem hiding this comment.
Bug
The memo comparison function only checks project.id equality but the updated comment claims it should re-render when verification topics change. The code won't actually re-render on verification topic changes while project.id remains the same, causing stale data in the UI when topics are updated.
| }, 100); | ||
| } catch (error) { | ||
| toast.error(t`Failed to approve artefact. Please try again.`); | ||
| console.error("error approving artefact: ", error); |
There was a problem hiding this comment.
Bug: Prevent State Updates on Unmounted Components
The setTimeout callback will execute after the component unmounts following navigate(). The delayed setIsApproving(false) call (~100ms later) will trigger a React warning about state updates on unmounted components, indicating a memory leak. The state update should be guarded to check if the component is still mounted, or the timeout should be cleared on unmount.
There was a problem hiding this comment.
not a bug, its intentional, so that we can show toast on the navigated routea
<!-- CURSOR_SUMMARY --> > [!NOTE] > Adds a new Refine step to choose Echo or Verify (with cooldowns), moves Echo triggering to content via URL param, refactors verify artefact generation/editing, and updates verify API endpoints/auth. > > - **Participant Portal** > - **Refine flow**: New `route` `conversation/:conversationId/refine` with `RefineSelection` offering `Echo` (immediate reply via `?echo=1`) or `Verify`, both with per-conversation cooldowns (`useRefineSelectionCooldown`). > - **UI/Navigation**: Header back button shown on `verify` and `refine`; recording toolbar shows new `Refine` button (replacing inline Echo/Verify logic) and hides scroll button on `verify/refine`. > - **Echo triggering**: Echo moved to `ParticipantConversationAudioContent` using `useChat`; supports auto-trigger via `?echo=1` and smooth scroll. > - **Verify Experience** > - **Generation flow**: Replaces mutation with `useGenerateVerificationArtefact` query keyed by `(conversationId, topicKey)`; integrates loading/error states and instructions. > - **Editing/approval**: Local edits cached client-side; persisted on Approve; toast feedback added via `Verify` wrapper `Toaster`. > - **Revise**: Uses artefact `date_created` as reference; updates cache directly on success; adds cooldown UI for revise button. > - **Artefact modal**: Simplified layout; improved markdown rendering. > - **API/Types** > - Switch verify endpoints to `apiNoAuth`; add `date_created` to `VerificationArtifact` and responses. > - Update payload casing (`useConversation`) and accept `approvedAt` as string; return updated artefact from `updateVerificationArtefact`. > - **Server (verify.py)** > - Remove auth deps on verify routes; include `date_created` in list/get/update responses; adjust update validation (no-op if neither `useConversation` nor `content`); refine revision flow and message building; minor sorting and data handling improvements. > - **Admin** > - `ProjectPortalEditor`: tweak form reset to preserve dirty values after saving verification topics. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a786e15. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Delegate auth to the "caller's token". Whoever called it did it. Not the Admin ## Original commits for reference - `a900449` – some cosmetics - `2a0852d` – fix search - `5b62510` – Merge branch 'main' of https://github.com/Dembrane/echo into sp-nov-17-25 - `11c8798` – remove chat meta - `b210820` – ECHO-569 Add refine functionality to the participant portal (#363) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Global search across projects, conversations, transcripts and chats * Transition curtain animations for login/onboarding and post-login flows * New verify artefact screens (loading & error) and artifact-by-ID retrieval * Refine modal and threshold flow for participant recordings * New chat collection surfaced (chat items, timestamps, user refs) * **Improvements** * Audit logs: expandable deltas, timestamp sorting, improved pagination * Route preloading and header/auth UX refinements; language picker confirmation * Stricter ownership/relationship-based access controls for project/chat data * **Bug Fixes** * Error page now redirects to Projects dashboard <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Usama <reach.usamazafar@gmail.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Usama <59267656+ussaama@users.noreply.github.com>
Note
Adds a new Refine step to choose Echo or Verify (with cooldowns), moves Echo triggering to content via URL param, refactors verify artefact generation/editing, and updates verify API endpoints/auth.
routeconversation/:conversationId/refinewithRefineSelectionofferingEcho(immediate reply via?echo=1) orVerify, both with per-conversation cooldowns (useRefineSelectionCooldown).verifyandrefine; recording toolbar shows newRefinebutton (replacing inline Echo/Verify logic) and hides scroll button onverify/refine.ParticipantConversationAudioContentusinguseChat; supports auto-trigger via?echo=1and smooth scroll.useGenerateVerificationArtefactquery keyed by(conversationId, topicKey); integrates loading/error states and instructions.VerifywrapperToaster.date_createdas reference; updates cache directly on success; adds cooldown UI for revise button.apiNoAuth; adddate_createdtoVerificationArtifactand responses.useConversation) and acceptapprovedAtas string; return updated artefact fromupdateVerificationArtefact.date_createdin list/get/update responses; adjust update validation (no-op if neitheruseConversationnorcontent); refine revision flow and message building; minor sorting and data handling improvements.ProjectPortalEditor: tweak form reset to preserve dirty values after saving verification topics.Written by Cursor Bugbot for commit a786e15. This will update automatically on new commits. Configure here.