Skip to content

Commit 0bc7942

Browse files
TestCopilot
andcommitted
feat(history): improve session loading and refresh branding
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fa6036b commit 0bc7942

24 files changed

Lines changed: 177 additions & 95 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img src="packages/website/static/images/landing/hero-demo-screenshot.png" width="1200" alt="Acepe working view" />
2+
<img src="packages/website/static/images/landing/acepe-working-view.png" width="1200" alt="Acepe working view" />
33
</p>
44

55
<div align="center">

assets/acepe-preview.gif

-5 MB
Binary file not shown.

assets/acepe-preview.mp4

-1.38 MB
Binary file not shown.

assets/logo-dark.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

assets/logo.svg

Lines changed: 32 additions & 6 deletions
Loading

packages/desktop/src-tauri/capabilities/default.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"permissions": [
77
"core:default",
88
"core:window:allow-start-dragging",
9+
"core:window:allow-maximize",
910
"core:window:allow-show",
1011
"core:window:allow-hide",
1112
"core:window:allow-close",

packages/desktop/src-tauri/src/db/repository.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,9 @@ fn compose_session_metadata_row(
645645
model: session_metadata::Model,
646646
state: Option<&acepe_session_state::Model>,
647647
) -> SessionMetadataRow {
648-
let title_overridden = state.and_then(|state| state.title_override.as_ref()).is_some();
648+
let title_overridden = state
649+
.and_then(|state| state.title_override.as_ref())
650+
.is_some();
649651
let display = state
650652
.and_then(|state| state.title_override.clone())
651653
.unwrap_or_else(|| model.display.clone());
@@ -1209,7 +1211,8 @@ impl SessionMetadataRepository {
12091211
active.updated_at = Set(now);
12101212
let state_project_path = active.project_path.as_ref().clone();
12111213
active.update(db).await?;
1212-
if let Some(existing_state) = AcepeSessionState::find_by_id(&session_id).one(db).await? {
1214+
if let Some(existing_state) = AcepeSessionState::find_by_id(&session_id).one(db).await?
1215+
{
12131216
let mut state_active: acepe_session_state::ActiveModel = existing_state.into();
12141217
state_active.project_path = Set(state_project_path);
12151218
state_active.updated_at = Set(now);
@@ -1335,7 +1338,9 @@ impl SessionMetadataRepository {
13351338
active.updated_at = Set(now);
13361339
let state_project_path = active.project_path.as_ref().clone();
13371340
active.update(&txn).await?;
1338-
if let Some(existing_state) = AcepeSessionState::find_by_id(&session_id).one(&txn).await? {
1341+
if let Some(existing_state) =
1342+
AcepeSessionState::find_by_id(&session_id).one(&txn).await?
1343+
{
13391344
let mut state_active: acepe_session_state::ActiveModel = existing_state.into();
13401345
state_active.project_path = Set(state_project_path);
13411346
state_active.updated_at = Set(now);

packages/desktop/src-tauri/src/history/commands/scanning.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ async fn derive_indexed_session_title(
7575
)
7676
.await
7777
{
78-
return resolve_indexed_session_title(session_id, display, title_overridden, Some(&session));
78+
return resolve_indexed_session_title(
79+
session_id,
80+
display,
81+
title_overridden,
82+
Some(&session),
83+
);
7984
}
8085
}
8186

@@ -350,7 +355,9 @@ async fn scan_project_sessions_inner(
350355

351356
#[cfg(test)]
352357
mod tests {
353-
use super::{derive_title_from_converted_session, indexed_source_path, resolve_indexed_session_title};
358+
use super::{
359+
derive_title_from_converted_session, indexed_source_path, resolve_indexed_session_title,
360+
};
354361
use crate::db::repository::SessionMetadataRow;
355362
use crate::session_jsonl::types::{
356363
ConvertedSession, SessionStats, StoredContentBlock, StoredEntry, StoredUserMessage,
@@ -418,7 +425,12 @@ mod tests {
418425
let converted = make_session("Original transcript title", "Original transcript title");
419426

420427
assert_eq!(
421-
resolve_indexed_session_title(&row.id, &row.display, row.title_overridden, Some(&converted)),
428+
resolve_indexed_session_title(
429+
&row.id,
430+
&row.display,
431+
row.title_overridden,
432+
Some(&converted)
433+
),
422434
"Design changes"
423435
);
424436
}

packages/desktop/src-tauri/src/history/commands/session_loading.rs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,24 @@ pub async fn get_unified_session(
130130
crate::session_converter::convert_cursor_full_session_to_entries(&fs);
131131
Some(converted)
132132
}
133-
Ok(None) => match crate::cursor_history::parser::find_session_by_id(&session_id).await {
134-
Ok(Some(fs)) => {
135-
let converted =
133+
Ok(None) => {
134+
match crate::cursor_history::parser::find_session_by_id(&session_id).await {
135+
Ok(Some(fs)) => {
136+
let converted =
136137
crate::session_converter::convert_cursor_full_session_to_entries(&fs);
137-
Some(converted)
138-
}
139-
Ok(None) => None,
140-
Err(e) => {
141-
tracing::warn!(
142-
session_id = %session_id,
143-
error = %e,
144-
"Cursor session lookup failed"
145-
);
146-
None
138+
Some(converted)
139+
}
140+
Ok(None) => None,
141+
Err(e) => {
142+
tracing::warn!(
143+
session_id = %session_id,
144+
error = %e,
145+
"Cursor session lookup failed"
146+
);
147+
None
148+
}
147149
}
148-
},
150+
}
149151
Err(e) => {
150152
tracing::warn!(
151153
session_id = %session_id,
@@ -383,7 +385,8 @@ mod tests {
383385
sequence_id: Some(1),
384386
};
385387

386-
let converted = apply_session_title_metadata(make_session("Original Transcript Title"), Some(&row));
388+
let converted =
389+
apply_session_title_metadata(make_session("Original Transcript Title"), Some(&row));
387390

388391
assert_eq!(converted.title, "Autonomous Mode");
389392
}

packages/desktop/src-tauri/tauri.conf.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
"windows": [
1515
{
1616
"title": "Acepe",
17-
"width": 1512,
18-
"height": 982,
19-
"maximized": true,
17+
"width": 720,
18+
"height": 480,
19+
"maximized": false,
20+
"center": true,
2021
"decorations": true,
2122
"hiddenTitle": true,
2223
"titleBarStyle": "Overlay",

0 commit comments

Comments
 (0)