Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
772f4f4
docs: research editing approaches (Obsidian/Slack-canvas style) for m…
aydiler Aug 23, 2026
183e107
docs: integrate product + ecosystem research findings into editing co…
aydiler Aug 23, 2026
5279b01
feat(editing): Phase 0/1 — safe save pipeline + Ctrl+E source-mode ed…
aydiler Aug 23, 2026
7426956
docs(editing): devlog 055, keyboard shortcuts, architecture for Phase…
aydiler Aug 23, 2026
34d60e5
feat(editing): Phase 3 — Obsidian-style live preview with block-level…
aydiler Aug 23, 2026
6fc2e08
docs(editing): devlog 056 + architecture/shortcuts for live preview
aydiler Aug 23, 2026
e322095
fix(editing): make Live mode observable and first click reliable
aydiler Aug 23, 2026
e27f3e2
fix(editing): hit-test returned cut segments, not block spans
aydiler Aug 23, 2026
12d4780
fix(editing): cache-key mismatch made Live clicks dead in real app
aydiler Aug 23, 2026
bd51c71
fix(editing): backfill block boundaries when entering Live mode
aydiler Aug 23, 2026
387b4d3
fix(editing): record block boundaries in content space
aydiler Aug 23, 2026
ec61691
docs: editing architecture overview — decision document
aydiler Aug 24, 2026
2992ded
feat(editing): styled layouter for Live editor — B+
aydiler Aug 24, 2026
466799b
docs: devlog 057 styled layouter; mark B+ implemented in overview
aydiler Aug 24, 2026
fffe325
fix(editing): self-healing keyboard focus for the live editor
aydiler Aug 24, 2026
dbcdd80
fix(editing): deterministic content-space boundary conversion
aydiler Aug 24, 2026
7819a27
fix(editing): self-calibrating click→block mapping
aydiler Aug 24, 2026
5e5a1bc
fix(editing): correct segment indexing + predicate in click hit-test
aydiler Aug 24, 2026
b88a912
fix(editing): skip clicks before first layout instead of panicking
aydiler Aug 24, 2026
a85c631
fix(editing): drop stale edit spans instead of panicking
aydiler Aug 24, 2026
29e83ff
feat(editing): PSE — persistent styled editors in Live mode
aydiler Aug 24, 2026
031facc
fix(editing): reset PSE session state on reload/load_file
aydiler Aug 24, 2026
3eabf3a
docs: devlog 058 — PSE persistent styled editors
aydiler Aug 24, 2026
e74aed6
feat(mcp): register mode/save buttons; add MCP-driven e2e script
aydiler Aug 24, 2026
cb07cb2
chore(editing): env-gated probes for session/click diagnostics
aydiler Aug 24, 2026
1a433e6
chore: enable mcp feature (opt-in) + MCP e2e driver script
aydiler Aug 24, 2026
e1b4f62
fix(editing): full-width top-down session editors
aydiler Aug 24, 2026
08f41bb
fix(editing): PSE editors adopt renderer typography (line height, spa…
aydiler Aug 24, 2026
6573d1e
fix(editing): explicit-size allocation for session editors
aydiler Aug 24, 2026
288bf13
feat(editing): PSE editors adopt renderer inline + spacing rules
aydiler Aug 24, 2026
8526151
docs: editing feature state summary (branch status, architecture, lim…
aydiler Aug 24, 2026
9c53991
Merge branch 'main' into feature/editing
aydiler Sep 13, 2026
e5b0199
fix(editing): session feedback lost the changed signal before the app…
aydiler Sep 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 63 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ eframe = { version = "0.33", default-features = false, features = [
egui = { version = "0.33", features = ["accesskit"] }

# MCP bridge for E2E testing (optional, local dev only - not on crates.io)
# egui-mcp-bridge = { path = "/home/ahmet/dev/mcp/egui-mcp/crates/egui-mcp-bridge", optional = true }
egui-mcp-bridge = { path = "/home/ahmet/dev/mcp/egui-mcp/crates/egui-mcp-bridge", optional = true }

# Markdown rendering with syntax highlighting (fork with typography support)
egui_commonmark_extended = { version = "0.28.2", features = [
Expand Down Expand Up @@ -73,7 +73,7 @@ percent-encoding = "2.3"

[features]
default = []
# mcp = ["dep:egui-mcp-bridge"]
mcp = ["dep:egui-mcp-bridge"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("mcp"))'] }
Expand Down
Binary file added base.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 34 additions & 1 deletion crates/egui_commonmark/egui_commonmark/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@ pub use egui_commonmark_backend_extended::RenderHtmlFn;
pub use egui_commonmark_backend_extended::RenderMathFn;
pub use egui_commonmark_backend_extended::alerts::{Alert, AlertBundle};
pub use egui_commonmark_backend_extended::misc::{
header_position_key, CommonMarkCache, STRONG_FONT_FAMILY,
header_position_key, CommonMarkCache, EditFeedback, EditRegionConfig, STRONG_FONT_FAMILY,
};
pub use egui_commonmark_backend_extended::misc::{BlockBoundary, top_level_block_spans};
pub use egui_commonmark_backend_extended::misc::{
EditSessionConfig, SessionBlock, SessionBlockFeedback,
};
pub use egui_commonmark_backend_extended::styler::{
EditBlockKind, MarkdownEditStyle, markdown_block_job,
};
pub use egui_commonmark_backend_extended::typography::{Measurement, TypographyConfig};
#[cfg(feature = "math")]
Expand Down Expand Up @@ -481,6 +488,32 @@ impl<'f> CommonMarkViewer<'f> {
self
}

/// Live-preview editing: replace the given top-level block byte range
/// with an inline TextEdit for this frame. The editor's working buffer
/// lives in egui temp state under `EditRegionConfig::id`; collect it via
/// [`CommonMarkCache::take_edit_feedback`] right after painting and splice
/// changed text back into your own buffer.
pub fn edit_region(mut self, region: Option<EditRegionConfig>) -> Self {
self.options.edit_region = region;
self
}

/// Persistent editing session: every text block in `blocks` paints as a
/// styled TextEdit bound to per-block temp buffers; other blocks render
/// normally. Collect per-block results via
/// [`CommonMarkCache::take_session_feedback`] right after painting.
pub fn edit_session(mut self, session: Option<EditSessionConfig>) -> Self {
self.options.edit_session = session;
self
}

/// Record block boundaries while painting so the caller can hit-test
/// clicks into byte ranges via [`CommonMarkCache::block_span_at_content_y`].
pub fn record_block_layout(mut self, on: bool) -> Self {
self.options.record_block_layout = on;
self
}

/// Paint the complete document this frame so off-screen target positions
/// can be measured. Keep this disabled for scrolling to a cached position.
pub fn force_full_render(mut self, force: bool) -> Self {
Expand Down
Loading
Loading