Skip to content

Commit bf4ab39

Browse files
committed
Include title in commit details component when used standalone
1 parent 74caa7e commit bf4ab39

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

apps/desktop/src/components/CommitDetails.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
type Props = {
1515
commit: UpstreamCommit | Commit;
1616
rewrap?: boolean;
17+
includeTitle?: boolean;
1718
};
1819
19-
const { commit, rewrap }: Props = $props();
20+
const { commit, rewrap, includeTitle }: Props = $props();
2021
2122
const userService = inject(USER_SERVICE);
2223
const userSettings = inject(SETTINGS);
@@ -35,7 +36,7 @@
3536
const maxLength = $derived((messageWidthRem - 2) * fontFactor - (Math.pow(zoom, 2) - 1));
3637
3738
const message = $derived(commit.message);
38-
const raw = $derived(splitMessage(message).description);
39+
const raw = $derived(includeTitle ? message : splitMessage(message).description);
3940
const description = $derived(rewrap ? rejoinParagraphs(raw) : raw);
4041
const abbreviated = $derived(truncate(description, maxLength, 3));
4142
const isAbbrev = $derived(abbreviated !== description);

apps/desktop/src/components/codegen/CodegenGitButlerMessage.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<ReduxResult {projectId} result={commit.result}>
3737
{#snippet children(commit)}
3838
<div class="commit-bubble">
39-
<CommitDetails {commit} />
39+
<CommitDetails includeTitle {commit} />
4040
</div>
4141
{/snippet}
4242
{#snippet empty()}

0 commit comments

Comments
 (0)