Conversation
PureWeen
added a commit
that referenced
this pull request
Feb 26, 2026
…input (#205) ## Summary Streamlines the session + worktree creation flow, reducing it from a 7-step process to 1-2 clicks. ### Changes **Foundation: Atomic \CreateSessionWithWorktreeAsync()\ API** - New method in \CopilotService\ that combines worktree creation, session creation, linking, group organization, and optional initial prompt into a single atomic call - Includes rollback: if session creation fails after worktree was created, the worktree is cleaned up - Auto-generates branch names (\session-YYYYMMDD-HHmmss\) when none specified **Foundation: \WorktreeId\ on \AgentSessionInfo\** - Added first-class \WorktreeId\ property to \AgentSessionInfo\ (previously only tracked via path string in \SessionMeta\) - Enables future features like session restore, branch badge display, and worktree reattachment **UX: ⚡ Quick Session button** - One-click button in repo group context menu (…) - Auto-generates branch name, creates worktree + session, switches to it - Zero form interaction needed **UX: ⑂ New Branch + Session inline input** - Opens compact input bar below the group header - Type a branch name (or \#123\ for a PR) → press Enter → done - Collapses the previous 7-step flow to: click → type → Enter ### Before vs After | Flow | Before | After | |------|--------|-------| | New session from repo | 7 steps (expand form → open worktree picker → choose mode → enter branch → wait → fill name/model → create) | **1 click** (⚡ Quick Session) or **3 keystrokes** (⑂ → type → Enter) | | Session-worktree link | Fragile path-string coupling | First-class \WorktreeId\ on session | | Failure handling | Orphaned worktrees on partial failure | Automatic rollback | ### Testing - Build succeeds ✅ - 1256/1261 tests pass (5 pre-existing failures unrelated to this PR) - Looking for manual testing feedback on the new UX flows cc @PureWeen --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
StephaneDelcroix
added a commit
that referenced
this pull request
Feb 27, 2026
Add built-in linkification for GitHub references (#123 and owner/repo#123) in chat messages. This converts plain-text issue/PR numbers into clickable links that open in the browser. - Add GitHubReferenceLinker utility that post-processes HTML after Markdig rendering to convert references to <a> links - Handle fully-qualified refs (owner/repo#123) without any repo context - Handle bare refs (#123) when session has a known repo URL - Safely skip content inside <a>, <code>, <pre>, <script>, <style> tags - Skip HTML entities ({) and URL fragments (/path#123) - Thread RepoUrl parameter through ChatMessageList → ChatMessageItem - Add GetRepoUrlForSession() to CopilotService for repo URL resolution - Add 30 unit tests covering all patterns and edge cases Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
StephaneDelcroix
added a commit
that referenced
this pull request
Feb 28, 2026
## Summary Adds built-in linkification for GitHub PR/issue references in chat messages. Plain-text references like `#123` and `owner/repo#123` are automatically converted to clickable links that open in the browser. ## What Changed - **GitHubReferenceLinker.cs** — New static utility that post-processes Markdig HTML output to convert GitHub references to `<a>` links - Handles fully-qualified refs (`owner/repo#123`) without any repo context - Handles bare refs (`#123`) when the session has a known repo URL - Safely skips content inside `<a>`, `<code>`, `<pre>`, `<script>`, `<style>` tags - Skips HTML entities (`{`) and URL fragments (`/path#123`) - **ChatMessageList.razor** — Calls linker in `RenderMarkdown`, accepts `RepoUrl` parameter - **ChatMessageItem.razor** — Passes `RepoUrl` to `RenderMarkdown` calls - **ExpandedSessionView.razor / SessionCard.razor / Dashboard.razor** — Thread `RepoUrl` from session context - **CopilotService.Organization.cs** — New `GetRepoUrlForSession()` method resolves repo URL via WorktreeId or group RepoId ## Tests - 30 new unit tests covering all patterns and edge cases - All 1575 existing tests continue to pass (1 pre-existing flaky test unrelated) --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for per-session input modes (chat, plan, autopilot) in the PolyPilot application. It updates the UI to allow users to select an input mode for each session, persists these modes across sessions, and ensures backward compatibility with previous UI state files. The changes affect both the frontend components and the backend persistence logic, and include comprehensive tests for the new functionality.
UI and UX Improvements:
ExpandedSessionViewcomponent, allowing users to select the input mode for each session. The active mode is visually highlighted. (PolyPilot/Components/ExpandedSessionView.razor)ExpandedSessionViewfromPlanMode(bool) toInputMode(string) and fromOnSetPlanModetoOnSetInputMode, supporting the new modes. (PolyPilot/Components/ExpandedSessionView.razor) [1] [2]State Management and Persistence:
planModeBySessiondictionary withinputModeBySessionin theDashboardcomponent, tracking the input mode for each session as a string. (PolyPilot/Components/Pages/Dashboard.razor)InputModesdictionary, ensuring that input modes are preserved across sessions and application restarts. (PolyPilot/Services/CopilotService.Persistence.cs,PolyPilot/Services/CopilotService.cs) [1] [2] [3]PolyPilot/Components/Pages/Dashboard.razor)Behavioral Changes:
[[PLAN]]or[[AUTOPILOT]]) is now determined by the current input mode for the session, supporting the new "autopilot" mode. (PolyPilot/Components/Pages/Dashboard.razor)PolyPilot/Components/Pages/Dashboard.razor)Testing:
UiStatePersistenceTests.csto verify default values, round-trip serialization/deserialization ofInputModes, and correct handling of legacy UI state files withoutInputModes. (PolyPilot.Tests/UiStatePersistenceTests.cs) [1] [2] [3] [4]