Skip to content

Move custom directives from chat header to a chip + popover in the chat input field #535

Closed

Description

@haiphucnguyen

Summary

Currently custom directives are displayed in the chat session header. This ticket moves them to a more contextual location — a single chip inside the chat input field area that opens a popover for managing active directives.

Motivation

  • The header location is easy to overlook and feels like a static session setting rather than an active input modifier
  • With many directives, the current header view becomes a large dropdown that takes up prominent space
  • Placing directives at the input field makes them feel like "what is shaping my next message", which is the correct mental model
  • A single chip with a popover scales cleanly from 1 to N directives without any layout issues

Implementation notes

  1. ChatInputField.kt — add a directivesChip composable row above the text input area, visible when the session has at least one directive. Chip renders active count badge when activeCount > 0.

  2. Popover — use a Popup anchored to the chip, opening upward (alignment = Alignment.TopStart with negative offset). Contains a LazyColumn of directive rows with Checkbox + label + edit icon.

  3. State — the chip needs:

    • List of all directives for the session
    • Set of currently active directive IDs
    • Toggle callback per directive
    • Add/edit callbacks
  4. Remove from header — once the chip is in place, remove the directive dropdown from the chat session header to avoid duplication.

  5. Persist toggle state — the active/inactive state per directive per session should be persisted so reopening a session restores which directives were enabled.

Activity

  1. added
    enhancement
    help wanted
    good first issue
    on Jul 22, 2026
  2. abdulm5 commented on Jul 22, 2026

    @abdulm5

    Hi! I’d like to work on this issue!

  3. haiphucnguyen commented on Jul 22, 2026

    @haiphucnguyen
    CollaboratorAuthor

    Hi @abdulm5 , assigned to you. I am looking forward to your contribution!

  4. haiphucnguyen commented on Jul 26, 2026

    @haiphucnguyen
    CollaboratorAuthor

    it is done #555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

1.4.13enhancementgood first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions