Skip to content

feat: improve Gemini display labels in search and summary surfaces #221

Closed

Description

@Sinity

Outcome

Gemini-origin conversations should be more recognizable in result lists, especially when the imported title / displayName is empty, terse, id-like, or otherwise less human-meaningful than the conversation content.

Problem or opportunity

Gemini parsing in polylogue/sources/parsers/drive.py currently resolves the conversation title from top-level title or displayName, else falls back to the file/id. In observed payload shape, there does not appear to be a richer conversation-level title source analogous to Codex thread names.

However, the parsed conversation often still contains enough evidence to synthesize a better display label:

  • first substantive user prompt text
  • attachment names such as Drive documents
  • message timing and branch context where useful

Codex already has explicit title enrichment and provenance in polylogue/sources/assembly_codex.py. Gemini has no comparable assembly/enrichment path today.

Expected scope

  • polylogue/sources/parsers/drive.py
  • provider assembly/enrichment layer under polylogue/sources/assembly*.py
  • conversation display-label/runtime behavior if a derived label should remain distinct from raw imported title
  • CLI and MCP surfaces that present titles/display labels
  • parser and output tests

Constraints and invariants

  • Preserve the raw imported title when present; do not silently destroy archive fidelity.
  • If a synthesized label is introduced, record provenance such as title_source or equivalent.
  • Avoid overly clever paraphrasing; use deterministic, inspectable heuristics.
  • Keep behavior robust for empty/minimal Gemini payloads.

Acceptance criteria

  • Gemini-origin conversations can present a more human-recognizable display label when the imported top-level title is weak.
  • The heuristic and its provenance are explicit and test-covered.
  • Search and summary surfaces use the improved display label where appropriate.
  • Tests cover at least id-like/empty titles, first-user-message fallback, and attachment-name-informed cases.

Verification plan

  • add parser/assembly tests for Gemini display-label resolution
  • add CLI/MCP output tests where display labels appear
  • run devtools verify

Context and evidence

Relevant files:

  • polylogue/sources/parsers/drive.py
  • polylogue/sources/providers/gemini_message.py
  • polylogue/sources/assembly.py
  • polylogue/sources/assembly_codex.py

Non-goals or explicitly deferred work

  • Inventing a fake canonical title when the archive has none; the goal is better display labeling, not rewriting source truth.
  • Solving broader search-hit evidence or attachment indexing in the same issue.

Activity

  1. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Starting implementation on feature/feat/gemini-display-labels.

    Initial scope from the issue:

    • preserve raw Gemini titles/display names; introduce explicit derived label provenance instead of overwriting source truth
    • deterministic fallback from first substantive user prompt and attachment names for weak titles
    • wire the improved label into search/summary surfaces and cover CLI/MCP output behavior

    I will keep the scratch log at .agent/scratch/221-gemini-display-labels.md and post the PR/verification record here before merge.

  2. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Implementation PR: #362

    Current result:

    • Gemini parsing records raw title provenance via title_source.
    • Gemini assembly derives deterministic provider_meta.display_label only for weak imported titles, with display_label_source explaining whether the label came from the first user prompt, an attachment name, or both.
    • Search/summary presentation surfaces now use provider display labels after user title overrides and before raw title fallback.

    Local verification:

    • devtools verify passed on the final diff.
    • Pre-push devtools verify --quick passed.
  3. added a commit that references this issue on May 7, 2026
    49e61eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions