Record browsing history in core

This commit is contained in:
2026-05-07 21:09:00 -04:00
parent 3bcf4460ca
commit d26ebdfb4c
8 changed files with 226 additions and 2 deletions
+7 -2
View File
@@ -1,13 +1,14 @@
use std::collections::BTreeMap;
use ely_domain::{
ArchivedTab, BrowserTab, DomainError, Profile, ProfileId, ProfileKind, Space, SpaceId, TabId,
UrlText,
ArchivedTab, BrowserTab, DomainError, HistoryEntry, Profile, ProfileId, ProfileKind, Space,
SpaceId, TabId, UrlText,
};
use crate::CoreError;
mod commands;
mod history;
mod profiles;
mod tabs;
@@ -36,6 +37,7 @@ pub struct BrowserSnapshot {
pub favorites: Vec<BrowserTab>,
pub pinned_tabs: Vec<BrowserTab>,
pub archived_tabs: Vec<ArchivedTab>,
pub history_entries: Vec<HistoryEntry>,
pub spaces: Vec<Space>,
pub active_tab_id: TabId,
pub active_space_id: SpaceId,
@@ -50,6 +52,7 @@ pub struct BrowserCore {
profiles: Vec<Profile>,
tabs: Vec<BrowserTab>,
archived_tabs: Vec<ArchivedTab>,
history_entries: Vec<HistoryEntry>,
active_space_id: SpaceId,
active_profile_id: ProfileId,
active_tab_id: TabId,
@@ -90,6 +93,7 @@ impl BrowserCore {
profiles: vec![profile],
tabs: vec![tab],
archived_tabs: Vec::new(),
history_entries: Vec::new(),
command_query: String::new(),
new_tab_url,
})
@@ -175,6 +179,7 @@ impl BrowserCore {
favorites: self.favorites(),
pinned_tabs: self.pinned_tabs(),
archived_tabs: self.archived_tabs.clone(),
history_entries: self.visible_history(),
spaces: self.spaces.clone(),
tabs: self.visible_tabs(),
active_tab_id: self.active_tab_id.clone(),