Preserve sidebar state for blogmarks.
This commit is contained in:
@@ -29,7 +29,7 @@ The project is under active development. Core blogging workflows are broadly ava
|
|||||||
- Persistent conversational AI with safe Markdown, streamed and cancellable responses, model/session/token tracking, bounded project-aware blog tools, and localized conversation management in the Chat workspace. Allowlisted render tools add persistent native cards, charts, forms, lists, metrics, mind maps, tables, and tabs without executing assistant-provided HTML or JavaScript.
|
- Persistent conversational AI with safe Markdown, streamed and cancellable responses, model/session/token tracking, bounded project-aware blog tools, and localized conversation management in the Chat workspace. Allowlisted render tools add persistent native cards, charts, forms, lists, metrics, mind maps, tables, and tabs without executing assistant-provided HTML or JavaScript.
|
||||||
- SSH-agent-based SCP or rsync publishing.
|
- SSH-agent-based SCP or rsync publishing.
|
||||||
- Integrated Git workflow for each blog project's current repository, with repository initialization, read-only origin discovery, Git LFS image tracking, status and diffs, branch/file history with bDS2-compatible sync-status colors, commits, cancellable fetch/pull/push, and post-pull filesystem reconciliation; network actions respect airplane mode.
|
- Integrated Git workflow for each blog project's current repository, with repository initialization, read-only origin discovery, Git LFS image tracking, status and diffs, branch/file history with bDS2-compatible sync-status colors, commits, cancellable fetch/pull/push, and post-pull filesystem reconciliation; network actions respect airplane mode.
|
||||||
- Site, media, and translation validation plus `ruds://new-post` Blogmark capture and Lua transforms; captures open directly in the post editor as soon as the draft exists, without waiting for on-device semantic indexing, and defer automatic translation until an explicit manual save, which queues one task per still-missing language. Rendering tasks keep long generated URLs compact in progress messages. Publishing never starts automatic translation. bDS2 keeps its separate `bds2://` bookmarklet protocol.
|
- Site, media, and translation validation plus `ruds://new-post` Blogmark capture and Lua transforms; captures open directly in the post editor as soon as the draft exists without changing the current or restored sidebar state or waiting for on-device semantic indexing, and defer automatic translation until an explicit manual save, which queues one task per still-missing language. Rendering tasks keep long generated URLs compact in progress messages. Publishing never starts automatic translation. bDS2 keeps its separate `bds2://` bookmarklet protocol.
|
||||||
|
|
||||||
RuDS uses no JavaScript application runtime and loads no CSS or JavaScript from CDNs. The preview is served by the Rust application and displayed by the operating-system webview.
|
RuDS uses no JavaScript application runtime and loads no CSS or JavaScript from CDNs. The preview is served by the Rust application and displayed by the operating-system webview.
|
||||||
|
|
||||||
|
|||||||
@@ -3000,8 +3000,6 @@ impl BdsApp {
|
|||||||
if self.task_manager.status(task_id) == Some(TaskStatus::Cancelled) {
|
if self.task_manager.status(task_id) == Some(TaskStatus::Cancelled) {
|
||||||
return Task::none();
|
return Task::none();
|
||||||
}
|
}
|
||||||
self.sidebar_view = SidebarView::Posts;
|
|
||||||
self.sidebar_visible = true;
|
|
||||||
let tab = Tab {
|
let tab = Tab {
|
||||||
id: post.id,
|
id: post.id,
|
||||||
tab_type: TabType::Post,
|
tab_type: TabType::Post,
|
||||||
@@ -3021,8 +3019,6 @@ impl BdsApp {
|
|||||||
for error in result.transform_errors {
|
for error in result.transform_errors {
|
||||||
self.add_output(&error);
|
self.add_output(&error);
|
||||||
}
|
}
|
||||||
self.sidebar_view = SidebarView::Posts;
|
|
||||||
self.sidebar_visible = true;
|
|
||||||
let post_id = result.post.id.clone();
|
let post_id = result.post.id.clone();
|
||||||
let already_open = self
|
let already_open = self
|
||||||
.tabs
|
.tabs
|
||||||
@@ -11140,6 +11136,8 @@ mod tests {
|
|||||||
app.tabs.clear();
|
app.tabs.clear();
|
||||||
app.active_tab = None;
|
app.active_tab = None;
|
||||||
app.post_editors.clear();
|
app.post_editors.clear();
|
||||||
|
app.sidebar_view = SidebarView::Media;
|
||||||
|
app.sidebar_visible = false;
|
||||||
let task_id = app.task_manager.submit("Importing blogmark");
|
let task_id = app.task_manager.submit("Importing blogmark");
|
||||||
|
|
||||||
let _ = app.update(Message::BlogmarkDraftCreated {
|
let _ = app.update(Message::BlogmarkDraftCreated {
|
||||||
@@ -11149,6 +11147,14 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(app.active_tab.as_deref(), Some(created.id.as_str()));
|
assert_eq!(app.active_tab.as_deref(), Some(created.id.as_str()));
|
||||||
assert!(app.post_editors.contains_key(&created.id));
|
assert!(app.post_editors.contains_key(&created.id));
|
||||||
|
assert_eq!(app.sidebar_view, SidebarView::Media);
|
||||||
|
assert!(!app.sidebar_visible);
|
||||||
|
let persisted =
|
||||||
|
engine::ui_state::load(app.db.as_ref().unwrap().conn(), &created.project_id)
|
||||||
|
.unwrap()
|
||||||
|
.unwrap();
|
||||||
|
assert_eq!(persisted.sidebar_view, "media");
|
||||||
|
assert!(!persisted.sidebar_visible);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
app.task_manager.status(task_id),
|
app.task_manager.status(task_id),
|
||||||
Some(TaskStatus::Running),
|
Some(TaskStatus::Running),
|
||||||
@@ -11175,7 +11181,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn imported_blogmark_activates_posts_and_opens_its_editor() {
|
fn imported_blogmark_opens_its_editor_without_changing_sidebar_state() {
|
||||||
let (db, project, temp) = setup();
|
let (db, project, temp) = setup();
|
||||||
ai::save_endpoint(
|
ai::save_endpoint(
|
||||||
db.conn(),
|
db.conn(),
|
||||||
@@ -11220,8 +11226,8 @@ mod tests {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
assert_eq!(app.sidebar_view, SidebarView::Posts);
|
assert_eq!(app.sidebar_view, SidebarView::Settings);
|
||||||
assert!(app.sidebar_visible);
|
assert!(!app.sidebar_visible);
|
||||||
assert_eq!(app.active_tab.as_deref(), Some(created.id.as_str()));
|
assert_eq!(app.active_tab.as_deref(), Some(created.id.as_str()));
|
||||||
assert!(app.post_editors.contains_key(&created.id));
|
assert!(app.post_editors.contains_key(&created.id));
|
||||||
assert!(app.embedded_preview.is_some());
|
assert!(app.embedded_preview.is_some());
|
||||||
|
|||||||
@@ -376,6 +376,9 @@ rule ExecuteTransform {
|
|||||||
-- opens that draft in the post editor immediately. Post-created side
|
-- opens that draft in the post editor immediately. Post-created side
|
||||||
-- effects that may take longer, including lazy model loading and semantic
|
-- effects that may take longer, including lazy model loading and semantic
|
||||||
-- indexing, continue without delaying or replacing the opened editor.
|
-- indexing, continue without delaying or replacing the opened editor.
|
||||||
|
-- Opening or completing the import does not change the sidebar's active
|
||||||
|
-- view or visibility; those remain in the current or restored project UI
|
||||||
|
-- session.
|
||||||
|
|
||||||
@guarantee TransformTrigger
|
@guarantee TransformTrigger
|
||||||
-- Transform scripts are triggered automatically by blogmark import.
|
-- Transform scripts are triggered automatically by blogmark import.
|
||||||
|
|||||||
Reference in New Issue
Block a user