Skip to content

feat(app): find spoken moments in search + play on open - #11400

Merged
undivisible merged 20 commits into
BasedHardware:mainfrom
aryanorastar:feat/app-search-find-play-moment-clean
Aug 25, 2026
Merged

undivisible merged 20 commits into
BasedHardware:mainfrom
aryanorastar:feat/app-search-find-play-moment-clean

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Aug 11, 2026 •

Copy link
Copy Markdown
Collaborator

Addressed review (David CR 2026-08-12)

  • Preserve server search rank in UI grouping (groupSearchResultsPreservingRank + tests)
  • Analyzer avoid_print baseline aligned (30)
  • Prior round: first timed snippet + sanitized transcript-index logs

Summary

In-app conversation search now finds transcript-only spoken phrases when the optional transcript-chunk index is available, attaches bounded timed match snippets, and opens the transcript at the matching moment for playback.

The API keeps the search-only ConversationSearchItem contract, preserves locked-conversation redaction, and fails open when indexing or playback is unavailable.

Verification

  • Focused backend unit tests for transcript search, date/speaker filtering, generated-client contracts, and desktop REST inventory.
  • Flutter search-seek + search-rank grouping tests passed locally (8/8 on tip).
  • Dart formatting and Black checks passed.
  • Product file line-count ratchet: declared exception below.
  • Physical device/audio seek smoke was not run (no kit).

Honest gaps

  • Physical / on-device seek smoke not run (no kit).

Failure-Class: none

Line-Count-Exception: backend/routers/conversations.py | 1819 -> 1865 | Owns bounded transcript-match hydration and privacy redaction for spoken-moment search; page/date filters stay at the route so transcript-only hits cannot starve summary results (#11400).

Supersedes stale conflicted PR #11205; same verified final tree, rebased onto current main without merge.

…play-moment-clean

# Conflicts:
#	backend/database/vector_db.py
#	backend/tests/unit/test_mcp_transcript_search.py
#	backend/utils/conversations/mcp_transcript_search.py
#	backend/utils/conversations/render.py
#	docs/api-reference/app-client-openapi.json
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

conversations = conversations[:effective_per_page]

P2 Badge Preserve displaced TypeSense hits across pages

When page 1 has transcript hits, this final slice returns only the first effective_per_page items after prepending transcript IDs, but the TypeSense call above still fetched only the original page of TypeSense IDs. For example, with per_page=10 and three transcript-only hits, page 1 returns the three transcript hits plus TypeSense hits 1–7, while page 2 starts at TypeSense hits 11–20, so hits 8–10 are permanently skipped.


child: Icon(Icons.graphic_eq, size: 14, color: Color(0xFF8B7CFF)),

P2 Badge Replace the purple snippet icon

This new Color(0xFF8B7CFF) is a purple accent in the conversation search UI, which violates the repo’s brand invariant that UI icons/accents/glows/gradients must not use purple; use a neutral/white tone instead.

AGENTS.md reference: AGENTS.md:L90-L90


merge_cap = min(max(effective_per_page * 3, effective_per_page), 60)

P2 Badge Return the requested page size above sixty

For clients that request per_page above 60, this cap makes merge_cap smaller than effective_per_page even though the search boundary accepts up to 250. The merged ID list and Firestore hydration can then contain at most 60 rows, and the later total_pages recompute treats that short page as terminal, so requests like per_page=100 or 250 silently lose available search results.


lines.append(f"{prefix}{text}")

P2 Badge Bound transcript snippet text

When a matched transcript segment or its neighbor is very long, this appends the entire segment text into every search snippet rather than a bounded excerpt around the match. For imported transcripts or long speaker turns, a search page can return megabytes of transcript text and make the list UI sluggish; trim each snippet to a fixed character budget around the hit before adding it.


conversation_ids = merge_typesense_page_with_transcript_hits(
typesense_ids,
transcript_ids,
page=effective_page,
per_page=merge_cap,
)

P2 Badge Honor transcript-first ranking in the app

This merge builds a transcript-first result order, but the mobile search path immediately sorts the returned conversations by startedAt ?? createdAt in ConversationProvider.searchConversations before rendering. When the best spoken-phrase match is older than title/overview hits, it gets buried by recency and the new find-and-play result is no longer prioritized; either preserve the server order for search results or send an explicit rank the client uses.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 issues found and verified against the latest diff

Confidence score: 3/5

  • In backend/utils/conversations/mcp_transcript_search.py, transcript-only phrase matching remains effectively inactive because this resolver is not wired into routers/mcp.py, so MCP search can silently miss relevant results for users — call this resolver in the MCP endpoint before hydration.
  • In app/lib/pages/conversation_detail/page.dart, seekToTranscriptSegment consumes the initial seek before confirming audio can start, which can leave users with an unavailable-playback message and no applied seek when dense audio is missing — gate seek consumption on confirmed playback (or retry once audio becomes available).
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="backend/utils/conversations/mcp_transcript_search.py">

<violation number="1" location="backend/utils/conversations/mcp_transcript_search.py:196">
P1: MCP conversation search still misses transcript-only phrases because this resolver is never wired into `routers/mcp.py`; use it in the MCP endpoint before hydration.</violation>
</file>

<file name="app/lib/pages/conversation_detail/page.dart">

<violation number="1" location="app/lib/pages/conversation_detail/page.dart:291">
P3: The initial seek is fully consumed before we know playback will actually begin. When the dense audio artifact isn't available (offline, or indexing still in flight), seekToTranscriptSegment shows the 'audioPlaybackUnavailable' snackbar and returns without throwing, so _maybePlayInitialSeek swallows nothing and never retries once the artifact becomes ready. Consider only marking _didInitialSeek = true after a successful play, or retrying on the next frame, so a transiently-unavailable artifact doesn't permanently drop the requested moment.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

return merge_summary_and_transcript_ids(transcript_ids, [], limit)


def resolve_mcp_conversation_search_ids(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: MCP conversation search still misses transcript-only phrases because this resolver is never wired into routers/mcp.py; use it in the MCP endpoint before hydration.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/utils/conversations/mcp_transcript_search.py, line 196:

<comment>MCP conversation search still misses transcript-only phrases because this resolver is never wired into `routers/mcp.py`; use it in the MCP endpoint before hydration.</comment>

<file context>
@@ -0,0 +1,253 @@
+    return merge_summary_and_transcript_ids(transcript_ids, [], limit)
+
+
+def resolve_mcp_conversation_search_ids(
+    uid: str,
+    query: str,
</file context>

if (_didInitialSeek || !mounted) return;
final start = widget.initialSeekStart;
if (start == null || _seekToSegmentCallback == null) return;
_didInitialSeek = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The initial seek is fully consumed before we know playback will actually begin. When the dense audio artifact isn't available (offline, or indexing still in flight), seekToTranscriptSegment shows the 'audioPlaybackUnavailable' snackbar and returns without throwing, so _maybePlayInitialSeek swallows nothing and never retries once the artifact becomes ready. Consider only marking _didInitialSeek = true after a successful play, or retrying on the next frame, so a transiently-unavailable artifact doesn't permanently drop the requested moment.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/lib/pages/conversation_detail/page.dart, line 291:

<comment>The initial seek is fully consumed before we know playback will actually begin. When the dense audio artifact isn't available (offline, or indexing still in flight), seekToTranscriptSegment shows the 'audioPlaybackUnavailable' snackbar and returns without throwing, so _maybePlayInitialSeek swallows nothing and never retries once the artifact becomes ready. Consider only marking _didInitialSeek = true after a successful play, or retrying on the next frame, so a transiently-unavailable artifact doesn't permanently drop the requested moment.</comment>

<file context>
@@ -272,6 +284,26 @@ class _ConversationDetailPageState extends State<ConversationDetailPage> with Ti
+    if (_didInitialSeek || !mounted) return;
+    final start = widget.initialSeekStart;
+    if (start == null || _seekToSegmentCallback == null) return;
+    _didInitialSeek = true;
+    final end = widget.initialSeekEnd ?? start;
+    if (selectedTab != ConversationTab.transcript) {
</file context>

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@kodjima33 @beastoin review/merge ping: replacement for stale #11205 is now MERGEABLE with the current-main conflicts resolved. Latest head 9e9d73cb5f has all required CI green; only human product/privacy review and approval remain. Please approve, request a focused change, or state an explicit hold.

@Git-on-my-level Git-on-my-level added security-review Touches auth, provider routing, secrets, or security-sensitive surfaces needs-tests PR introduces logic that should be covered by tests flutter flutter work labels Aug 11, 2026

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the careful rebased cleanup here. The overall direction is cohesive: backend/routers/conversations.py now merges page-1 transcript-chunk hits into normal conversation search, backend/models/conversation.py / docs/api-reference/app-client-openapi.json expose a search-only ConversationSearchItem, and the generated Dart/TS clients track that contract. I also verified the focused backend tests for the search/redaction paths pass locally: 62 passed.

I’m requesting changes for two concrete issues before this is merge-ready:

  1. app/lib/backend/schema/conversation.dart only considers snippets.first in searchMomentSeekFromSnippets. If the first matching snippet has text evidence but no start, and a later snippet is timed, the search result opens without find-and-play even though the backend supplied a usable timed hit. Please select the first snippet with a non-null start (falling back end to that same snippet’s start), and add a unit test covering “first snippet untimed, later snippet timed.” app/test/unit/search_moment_seek_test.dart currently covers the all-untimed case but not this ordering edge.

  2. backend/utils/conversations/mcp_transcript_search.py logs raw exception text in both transcript-index fail-open branches (conversation search: ... %s and mcp conversation search: ... %s). Those exceptions can come from vector/search infrastructure and may include upstream request details. Omi’s backend logging guidance requires sanitization for user/search-related data; please sanitize or omit exception detail while preserving the fail-open behavior. The surrounding privacy/redaction path in backend/utils/conversations/render.py looks correct for locked conversations, so this is specifically about log exposure rather than API response leakage.

Additional observations from the sampled files:

  • backend/routers/conversations.py correctly re-hydrates by owner, filters locked rows before attaching snippets, reapplies speaker/date filtering, and trims back to the effective page size after the transcript over-fetch.
  • backend/routers/mcp.py and backend/routers/mcp_sse.py are already wired through resolve_mcp_conversation_search_ids, so I do not see the current head as missing MCP transcript-search integration.
  • app/lib/backend/http/api/conversations.dart preserves match_snippets by round-tripping the generated ConversationSearchItem JSON into ServerConversation; that is a reasonable bridge for this generated-client shape.
  • app/lib/pages/conversations/widgets/conversation_list_item.dart threads the computed seek into ConversationDetailPage; once the snippet selection edge above is fixed, this should avoid opening a playable later match as a plain overview.
  • desktop/windows/src/renderer/src/lib/omiApi.generated.ts, the three web generated clients, and docs/api-reference/app-client-openapi.json consistently switch /v1/conversations/search items to ConversationSearchItem.

Validation note: I could not run the Flutter focused test locally because flutter is not installed in this review environment; please rely on CI or run flutter test test/unit/search_moment_seek_test.dart after adding the ordering regression test.

Leaving this for human maintainer review after the concrete fixes because this changes the app search/playback product path and a transcript-search logging surface.

— Automated maintainer review


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level @kodjima33 @beastoin re-review requested on head 7b7b05a0bd.

Addressed the requested blockers:

  • searchMomentSeekFromSnippets now selects the first timed snippet, with regression coverage for an untimed first snippet followed by a timed hit.
  • Transcript-index fail-open logs now sanitize exception text.

Also fixed verified in-scope findings:

  • Removed the purple search-result icon accent.
  • Raised transcript search/merge caps to the API-supported 250-page limit.
  • Bounded returned transcript snippet text to 2,000 characters.
  • Preserved server transcript-match ranking in the app instead of re-sorting search results by recency.

Verification: 76 focused backend tests passed; 7 Flutter search-seek tests passed; Black and Dart formatting passed. Please dismiss the stale changes-requested review and re-check the new head.

@Git-on-my-level Git-on-my-level added the needs-maintainer-review Needs a human maintainer to sign off before merge label Aug 12, 2026

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the quick follow-up. I verified the two blockers from the previous automation review on the current head are addressed: app/lib/backend/schema/conversation.dart now uses the first timed TranscriptMatchSnippet rather than blindly using snippets.first, app/test/unit/search_moment_seek_test.dart covers the untimed-then-timed ordering case, and backend/utils/conversations/mcp_transcript_search.py sanitizes the transcript-index fail-open exception text.

I’m still requesting changes for two current-head issues:

  1. app/lib/providers/conversation_provider.dart still loses the server’s search ranking before the user sees results. The initial search path preserves searchedConversations = convos, but groupSearchConvosByDate() immediately calls _buildGroupedByDate(), which sorts every displayed bucket by (startedAt ?? createdAt) (lines 659-689 on this head). searchMoreConversations() also explicitly sorts the appended search list by recency. That means an older transcript-only spoken match returned first by backend/routers/conversations.py / merge_typesense_page_with_transcript_hits() can still be buried in the rendered list, so the “find spoken moments” behavior is not reliably visible. Please keep server order for active search results, or add a separate grouping path/rank that preserves the backend order while still handling the normal non-search conversation list.

  2. The current Dart Analyze & Tests check is failing. The failing job is the analyzer ratchet (app/scripts/analyze_ratchet.sh), which reports avoid_print: 30 found, baseline 29 and exits 1. Please either remove the new analyzer finding or update the analyzer baseline in the same PR if this is an intentional acceptance.

Other sampled file notes:

  • .github/scripts/product_file_line_count_ratchet_baseline/backend-routers.json documents the backend/routers/conversations.py route-size increase; that looks consistent with the new route-owned search merge/redaction work.
  • app/lib/backend/http/api/conversations.dart keeps match_snippets by converting the generated ConversationSearchItem JSON into ServerConversation; that bridge looks reasonable for this generated-client shape.
  • app/lib/pages/conversation_detail/page.dart opens the transcript tab and invokes the initial seek callback once the transcript widget registers it; even if playback is unavailable, it still lands the user on the transcript tab.
  • app/lib/pages/conversations/widgets/conversation_list_item.dart threads the computed seek into ConversationDetailPage and the prior purple snippet icon is now neutral (Colors.white70).
  • backend/routers/conversations.py over-fetches transcript candidates on page 1, preserves the merged id order after Firestore hydration, filters locked rows before attaching snippets, and re-applies speaker/date filters.
  • backend/utils/conversations/render.py clears match_snippets for locked list and integration redaction paths, which is the right privacy boundary.
  • backend/models/conversation.py, docs/api-reference/app-client-openapi.json, app/lib/backend/schema/gen/conversation_wire.g.dart, and the generated TypeScript clients consistently expose ConversationSearchItem / TranscriptMatchSnippet for /v1/conversations/search.
  • The backend unit coverage in backend/tests/unit/test_conversation_search_date_validation.py, backend/tests/unit/test_mcp_transcript_search.py, backend/tests/unit/test_conversation_redact_enrich.py, and generated-client contract tests covers the important search merge, snippet, redaction, and schema paths.

Leaving this for human maintainer review because it changes a user-facing app search/playback path and a transcript-search data surface.

— Automated maintainer review


by AI on behalf of David — please have a human maintainer review the search-ranking/product behavior before merge.

@Git-on-my-level
Git-on-my-level dismissed their stale review August 12, 2026 08:00

Resolved on current head: timed snippet selection now skips untimed snippets and transcript-index fail-open logs sanitize exception text.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Additional CI fix pushed on head ca89d05451:

  • Merged current main (687ea69cfa) so the branch tracks the actual PR base.
  • app/analysis_baseline.json was stale against current main (avoid_print 30 vs 29); ratchet update records only that current-tree count and the improved prefer_final_fields count (4 -> 3).
  • bash app/scripts/analyze_ratchet.sh now passes.
  • Full bash app/test.sh passed locally: 1,196 tests.

The earlier focused backend/Flutter checks remain green. @Git-on-my-level please re-check/dismiss the stale changes-requested review when the new CI completes.

…play-moment-clean

# Conflicts:
#	.github/scripts/product_file_line_count_ratchet_baseline/backend-routers.json
#	app/lib/pages/conversations/widgets/conversation_list_item.dart
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Take main's diff-scoped line-count ratchet (no shared ledger). Spoken-moment search + rank preservation stay on this branch.

Co-authored-by: Cursor <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level re-review / dismiss on 60f5afa101.

Conflicts: GitHub was DIRTY on backend-routers.json because main deleted the shared line-count ledger. Took that deletion; growth is now declared on the PR body:

Line-Count-Exception: backend/routers/conversations.py | 1508 -> 1554 | …

Both remaining blockers from the 2026-08-12 review are still on this tip:

  • Search grouping uses groupSearchResultsPreservingRank (older transcript-only hit stays first); searchMoreConversations does not recency-sort. search_rank_grouping_test.dart covers it.
  • Analyzer ratchet was already aligned; this refresh only resolved the ratchet-file conflict.

Local: Flutter search-rank + seek 8 passed; backend search/redaction/MCP 62 passed. Honest gap: no device/audio seek smoke.

@kodjima33 rebase you asked for is done. After David dismisses the stale CHANGES_REQUESTED, this is a merge.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level re-review / dismiss (>1d): tip 60f5afa101 still MERGEABLE with ranking + seek fixes and main refresh. Prior CHANGES_REQUESTED was on the pre-rank head. Please dismiss/re-approve or state remaining blocker.

Resolved OpenAPI schema merge (keep transcript match snippets + main
screen-activity schemas) and regenerated TypeScript clients.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@aryanorastar

aryanorastar commented Aug 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

refreshed onto current main (bd3d3e5bb9) — merge conflicts cleared (OpenAPI schema merge + regenerated TS clients). MERGEABLE. Please re-review / dismiss CHANGES_REQUESTED when tip CI is green.

Main refresh left SearchConversationsResponse pointing at Conversation;
re-export the app-client contract and regenerate TS clients so spoken-moment
match_snippets stay on the search response.

Co-authored-by: Cursor <[email protected]>
@aryanorastar

aryanorastar commented Aug 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

tip after bd3d3e5 CI:

  • Hygiene — Line-Count-Exception updated to measured 1515 -> 1561 for backend/routers/conversations.py (main grew the base).
  • OpenAPI — main-refresh left /v1/conversations/search items typed as Conversation; re-exported app-client OpenAPI so items are ConversationSearchItem again and regenerated the four TS clients.

Ranking/seek blockers from your prior CR remain on tip (groupSearchResultsPreservingRank + first-timed-snippet). Please dismiss CHANGES_REQUESTED when this tip’s CI is green.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level re-review / dismiss CHANGES_REQUESTED — tip efcb515a

Verified your 2026-08-12 blockers against this tip:

  1. Search rank — groupSearchConvosByDate() now uses groupSearchResultsPreservingRank (not _buildGroupedByDate recency sort). searchMoreConversations() appends server pages then regroups without re-sorting by date. Covered by app/test/unit/search_rank_grouping_test.dart (older top-hit stays above newer lower-hit; same-day keeps server order). Local: 8/8 seek+rank tests passed.

  2. avoid_print ratchet — baseline bumped in-tree (app/analysis_baseline.json → avoid_print: 30) via ca89d05451.

Earlier blockers (first timed snippet + sanitized transcript-index logs) remain in place from the prior round.

Author-side clear — please dismiss CR / re-approve when you have a moment.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

feat(app) spoken-moment search — feature, approve-only per policy

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level @kodjima33

Nik (@kodjima33) has approved this head with write-access (feat(app) spoken-moment search — feature, approve-only per policy).

All prior blockers from David’s review have been verified resolved on tip efcb515a:

  1. Server Search Rank Preserved: groupSearchConvosByDate() uses groupSearchResultsPreservingRank (no recency sort burying transcript hits) + search_rank_grouping_test.dart passes (8/8 local tests green).
  2. Dart Analyzer Ratchet: Pinned in app/analysis_baseline.json (avoid_print: 30).
  3. First Timed Snippet & Logging: Skips untimed snippets and sanitizes transcript-index fail-open logs.
  4. CI Status: All 24 checks are green, 0 conflicts.

@Git-on-my-level Please dismiss the stale CHANGES_REQUESTED review when convenient so this is ready to merge.

…play-moment-clean

# Conflicts:
#	backend/tests/unit/test_conversation_events_bounds.py
#	backend/tests/unit/test_conversation_search_date_validation.py
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…r the main refresh

Merging current main brought new Conversation fields (imported,
meeting_dedup_speech_s and siblings) that the committed app-client
contract did not carry, so the Public Developer API contract check
failed on a stale spec rather than on anything this PR changed.

Re-exported the spec and regenerated the clients that track it. The
Swift generator was already in sync.

Verification:
- backend/scripts/export_openapi.py --surface app-client --write
- generate_ts_openapi_types.py / generate_dart_models.py regenerated;
  generate_swift_openapi_types.py --check already clean
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

ca89d05 raised avoid_print 29 -> 30 to clear a red ratchet. That
occurrence came from main at the time, not from this branch: no file this
PR touches contains a print( call. main has since gone back to 29, so the
bump was leaving this PR carrying accepted lint debt it never created, and
a genuinely new print in a later commit would have ratcheted in unnoticed
under the raised ceiling.

Reverting to 29 makes analysis_baseline.json identical to main, so the
file drops out of this PR's diff entirely (git diff origin/main on it is
now empty). The ratchet treats current < baseline as advisory, not a
failure, so this was green either way -- it is the ceiling that was wrong,
not the check.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@aryanorastar

aryanorastar commented Aug 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level both blocking items from your review are resolved. Flagging because the request-changes is still on file and predates the fixes.

1. Server search ranking lost before render — fixed with the separate grouping path you suggested rather than by changing the shared one. _groupSearchConvosByDateWithoutNotify() now calls groupSearchResultsPreservingRank(); _buildGroupedByDate() is untouched and still owns the normal non-search list, so its recency sort (and the merged-conversation day-bucket ordering it exists for) is unchanged. searchMoreConversations() no longer re-sorts the appended page — it appends and regroups through the same rank-preserving path. The comment at the initial-search site records why:

Search results are ranked by the server, including transcript-match relevance. Re-sorting by recency would bury older spoken-moment matches.

Covered by app/test/unit/search_rank_grouping_test.dart, including the case you described — an older top-ranked hit staying above a newer lower-ranked one.

2. avoid_print: 30 found, baseline 29 — resolved, but I want to correct how I resolved it the first time. I took the update-the-baseline option in ca89d0545, and that was the wrong call: that occurrence came from main at the time, not from this branch. No file this PR touches contains a print( call.

So in 39328abb I reverted it to 29. app/analysis_baseline.json is now byte-identical to main and drops out of this PR's diff entirely — git diff origin/main on that file is empty. The raised ceiling would have let a genuinely new print in a later commit ratchet in unnoticed, which is the opposite of what the check is for.

To be precise about the CI signal: the ratchet treats current < baseline as advisory, not a failure, so the check was green either way. It was the ceiling that was wrong, not the check.

Everything is green on this head with nothing failing or pending. Human maintainer review on the user-facing search/playback path is still the right gate — please dismiss the stale request-changes when you next pass.


Updated for the current head 29cd1ac. Since I wrote the above, two more commits landed (a main merge and the client regeneration that followed it), and @kodjima33 re-approved on this exact head an hour ago. I re-verified both of your blockers against 29cd1ac rather than assuming the merges left them intact:

  • Ranking — conversation_provider.dart:890 (the search path) calls groupSearchResultsPreservingRank, while :894 (the normal conversation list) still calls _buildGroupedByDate. The split you asked for is intact, no merge drift.
  • Analyzer baseline — git diff origin/main -- app/analysis_baseline.json is empty, so the file is byte-identical to main and contributes nothing to this diff.

All 29 checks pass, 5 skipped, nothing failing or pending, no conflicts.

At this point the 2026-08-12 request-changes is the only thing blocking merge — GitHub reports "Requested changes must be addressed to merge this pull request", with your review as the one change requested against @kodjima33's approval. Both of its items are resolved above, and you dismissed an earlier review on this same PR once the underlying items were fixed, so I think this is just waiting on your next pass rather than on anything outstanding from me.

No rush, and no action needed on my side — flagging only because the block is now purely the stale review rather than the code.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feature (spoken-moment search + play-on-open), mobile/app area — approve-only per policy (not a bug fix). New commits since last review; re-approved on latest head.

@undivisible
undivisible dismissed Git-on-my-level’s stale review August 25, 2026 09:02

Stale CR on 7b7b05a. Both blockers are on the current head: groupSearchResultsPreservingRank keeps server search order (91062d2) and the avoid_print baseline is no longer loosened (39328ab). kodjima33 approved the tip.

@undivisible
undivisible merged commit eb6b233 into BasedHardware:main Aug 25, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flutter flutter work needs-maintainer-review Needs a human maintainer to sign off before merge needs-tests PR introduces logic that should be covered by tests security-review Touches auth, provider routing, secrets, or security-sensitive surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants