Lite: improve selection handling and add branch selection with diff view#12923
Open
OliverJAsh wants to merge 25 commits intomasterfrom
Open
Lite: improve selection handling and add branch selection with diff view#12923OliverJAsh wants to merge 25 commits intomasterfrom
OliverJAsh wants to merge 25 commits intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Lite UI’s selection model to support richer, more explicit selections (branch / commit / file) and adds a branch-diff preview path, alongside UI/UX tweaks for expanding commits and improving selection styling.
Changes:
- Introduces discriminated-union selection types (Branch / Commit / CommitFile / ChangesFile) and default selection behavior.
- Adds branch selection in the workspace stack view with a diff preview for the selected branch ref.
- Refactors commit row rendering (expand/collapse control, drag disable while editing) and updates related CSS styling.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/but-sdk/src/generated/index.d.ts | Adds doc comment for assignHunk API. |
| apps/lite/ui/src/routes/project-shared.tsx | Refactors commit/file row components; adds expand control and drag gating. |
| apps/lite/ui/src/routes/project-shared.module.css | Adds/updates styles for selection, highlighting, file rows, expand/menu controls. |
| apps/lite/ui/src/routes/project-index.tsx | Adds branch selection + branch diff preview; revamps workspace selection normalization/defaulting. |
| apps/lite/ui/src/routes/project-index.module.css | Adds styling for branch buttons, move-target positioning, dependency indicator. |
| apps/lite/ui/src/routes/project-branches.tsx | Migrates branch page selection to tagged union; adds commit expand logic + Match-based preview. |
| apps/lite/ui/src/global.css | Changes global button border styling. |
| apps/lite/AGENTS.md | Documents Lite component conventions and React Compiler guidance. |
Comments suppressed due to low confidence (1)
apps/lite/ui/src/global.css:24
- In
global.css,button { border: none; border-color: black; }leavesborder-coloras a no-op. Either removeborder-coloror reintroduce an explicit border style so the rule is internally consistent.
button {
border: none;
border-color: black;
font: inherit;
line-height: inherit;
text-align: left;
}
| type="button" | ||
| className={styles.expandButton} | ||
| onClick={() => { | ||
| startExpandTransition(toggleExpand); |
| .selected { | ||
| background-color: black; | ||
| /* TODO: */ | ||
| background-color: black !important; |
Comment on lines
1186
to
1191
| {stack.segments.map((segment) => { | ||
| const branchName = segment.refName?.displayName ?? "Untitled"; | ||
| const branchRef = getSegmentBranchRef(segment); | ||
| const anchorRef = segment.refName ? segment.refName.fullNameBytes : null; | ||
| return ( | ||
| <li key={branchName}> |
Comment on lines
+633
to
637
| if (!stackIds.has(selection.stackId)) return null; | ||
| return selection; | ||
| }), | ||
| Match.exhaustive, | ||
| ); |
Comment on lines
+69
to
+77
| if (commitIds.has(selection.commitId)) return selection; | ||
| const branchSelection: Selection = { | ||
| _tag: "Branch", | ||
| branchName: selection.branchName, | ||
| }; | ||
| return branchSelection; | ||
| }), | ||
| Match.exhaustive, | ||
| ); |
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.
No description provided.