Skip to content

ECHO-569 Add refine functionality to the participant portal#363

Merged
spashii merged 5 commits intomainfrom
verify-changes
Nov 18, 2025
Merged

ECHO-569 Add refine functionality to the participant portal#363
spashii merged 5 commits intomainfrom
verify-changes

Conversation

@ussaama
Copy link
Copy Markdown
Contributor

@ussaama ussaama commented Nov 18, 2025

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.

Written by Cursor Bugbot for commit a786e15. This will update automatically on new commits. Configure here.

@linear
Copy link
Copy Markdown

linear bot commented Nov 18, 2025

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

}, 100);
} catch (error) {
toast.error(t`Failed to approve artefact. Please try again.`);
console.error("error approving artefact: ", error);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a bug, its intentional, so that we can show toast on the navigated routea

@spashii spashii added this pull request to the merge queue Nov 18, 2025
Merged via the queue into main with commit e1d9707 Nov 18, 2025
11 checks passed
@spashii spashii deleted the verify-changes branch November 18, 2025 13:33
spashii pushed a commit that referenced this pull request Nov 18, 2025
<!-- 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 -->
@spashii spashii mentioned this pull request Nov 18, 2025
spashii added a commit that referenced this pull request Nov 21, 2025
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>
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.

2 participants