← Back to Pull requests

Chat: pick a new chat's project, profile and gateway on its greeting #375

Closed
unknown closed this pull request without merging on Nov 03, 2026 23:14 UTC
View on GitHub
unknown unknown commented on Nov 03, 2026 22:56 UTC
Author

What

A new chat's greeting now says where it will run, and lets you change it before the first message:

  • "What are we building in (project ⌄)?" The project sits in the question as a pill. Tapping it opens Home and the profile's projects. Picking one moves the unsent new chat there and keeps what you've typed; session.create then carries the project's folder as cwd.

  • "Hermes on (gateway) · (profile) ⌄" under it opens the gateway's profiles and the saved gateways, when there is more than one. Picking one starts a new chat there, as the New chat button would.

  • Settings → Use last project (on by default): a new chat starts in the project the last one was started in, per gateway and profile. Starting a chat from Home in the list forgets it.
  • Once the first message is on its way, or for a stored chat or a bot's, the greeting offers no moves. A chat that has begun is never moved.

    Why

    You couldn't start a chat in a project without first opening the sidebar, filtering by the project and pressing New chat there. The greeting was empty space that could say where the chat goes.

    Details

  • ChatSession.startIn / unstarted: a new chat that hasn't reached the gateway takes another folder in place. ChatViewModel.sameChatAs keeps the same chat (and its composer) when only the folder changed.

  • At launch the settings may still be being read. The first new chat opens at once and moves to the last project when they're in, unless you've already picked one or sent. A chat shared or opened from a shortcut at that moment waits for them instead, so a draft that sends itself starts in the right project.

  • A project remembered before the settings are read is saved after the read, so it can't replace the stored settings.

  • While the project list is still loading, a chat already set to start in a folder names the folder, so a send never goes somewhere the screen didn't say.

  • The pill shortens a long project name rather than leaving "in" alone on its line, and wraps with its "?" when the line is too narrow.
  • How I tested it

  • Unit tests:

  • - ChatViewModelTest.pickingAProjectKeepsTheNewChatAndStartsItThere
    - AppViewModelTest: aNewChatFromHomeInTheListForgetsTheLastProject, theFirstChatAtLaunchWaitsForTheLastProject, aChatSharedAtLaunchStartsInTheLastProject, aProjectPickedBeforeTheSettingsAreReadStaysAndKeepsThem, theLastProjectIsKeptPerProfile, pickingAProjectMovesOnlyAnUntouchedNewChat
    - GreetingPlacesTest for the labels
  • On an emulator against a real gateway:

  • - moved a typed new chat between projects and checked the text stayed;
    - checked the new session landed in the picked project;
    - switched profile and gateway from the greeting;
    - turned Use last project on and off;
    - checked the layout at 360 dp and in both themes.
  • Screenshots are from the preview gallery's sample data.
  • Screenshots

    | Before | After (dark) | After (360 dp, light) |
    |---|---|---|
    | <img width="240" alt="before" src="https://github.com/user-attachments/assets/bebf44bc-6439-455c-99ff-ef069b9f3f46"> | <img width="240" alt="after, dark" src="https://github.com/user-attachments/assets/39019cb3-a115-420b-a760-c431f1179d27"> | <img width="240" alt="after, 360 dp light" src="https://github.com/user-attachments/assets/fc46e6ea-bc27-45f6-9ca7-577d86607dd1"> |

    Diff: 416 lines (+312 / -104) across 5 files Reviewer: Giton22 Review duration: 17m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 416 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.361
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #375"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.0% (MEDIUM) · Higher = larger blast radius
    45.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.8% · Safe to merge
    17.8%