xonecas.ioDon't click! Sean Caetano Martin Sign in

cast / commits / 1dc91a6

Polish the UI on one type scale and a role palette

Five text styles (small, body, strong, title, display) at two weights
replace eleven ad hoc ones, and feed the kit so inputs and the Markdown
preview match the editor. Labels use sentence case. JetBrains Mono
replaces IBM Plex Mono.

Colors are named by role, blue is gone, and hover and shadow are
tokens. Background steps replace most hairlines, every control is 24px
tall with a 4px radius, and chips fold into a ghost button.

The status bar drops the duplicated agent, the constant mount path and
the version. Welcome and Settings lose their empty sidebars. Terminal
lines lose the repeated task id. Setup reuses the shared chrome.
Tabs, rows, nodes and links are focusable.

Co-Authored-By: Claude Opus 5.5

sacenox3 days ago1dc91a6ba5a333e6275af134eb227a20f871b9e7parent 0c1f1f626 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

assets/fonts/IBMPlexMono-Medium.ttf+0-0

Binary file, not shown.

assets/fonts/IBMPlexMono-Regular.ttf+0-0

Binary file, not shown.

assets/fonts/Inter-SemiBold.ttf+0-0

Binary file, not shown.

assets/fonts/JetBrainsMono-LICENSE.txt+93-93
@@ -1,93 +1,93 @@
1-Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
2-
3-This Font Software is licensed under the SIL Open Font License, Version 1.1.
4-
5-This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
6-
7-
8------------------------------------------------------------
9-SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10------------------------------------------------------------
11-
12-PREAMBLE
13-The goals of the Open Font License (OFL) are to stimulate worldwide
14-development of collaborative font projects, to support the font creation
15-efforts of academic and linguistic communities, and to provide a free and
16-open framework in which fonts may be shared and improved in partnership
17-with others.
18-
19-The OFL allows the licensed fonts to be used, studied, modified and
20-redistributed freely as long as they are not sold by themselves. The
21-fonts, including any derivative works, can be bundled, embedded,
22-redistributed and/or sold with any software provided that any reserved
23-names are not used by derivative works. The fonts and derivatives,
24-however, cannot be released under any other type of license. The
25-requirement for fonts to remain under this license does not apply
26-to any document created using the fonts or their derivatives.
27-
28-DEFINITIONS
29-"Font Software" refers to the set of files released by the Copyright
30-Holder(s) under this license and clearly marked as such. This may
31-include source files, build scripts and documentation.
32-
33-"Reserved Font Name" refers to any names specified as such after the
34-copyright statement(s).
35-
36-"Original Version" refers to the collection of Font Software components as
37-distributed by the Copyright Holder(s).
38-
39-"Modified Version" refers to any derivative made by adding to, deleting,
40-or substituting -- in part or in whole -- any of the components of the
41-Original Version, by changing formats or by porting the Font Software to a
42-new environment.
43-
44-"Author" refers to any designer, engineer, programmer, technical
45-writer or other person who contributed to the Font Software.
46-
47-PERMISSION & CONDITIONS
48-Permission is hereby granted, free of charge, to any person obtaining
49-a copy of the Font Software, to use, study, copy, merge, embed, modify,
50-redistribute, and sell modified and unmodified copies of the Font
51-Software, subject to the following conditions:
52-
53-1) Neither the Font Software nor any of its individual components,
54-in Original or Modified Versions, may be sold by itself.
55-
56-2) Original or Modified Versions of the Font Software may be bundled,
57-redistributed and/or sold with any software, provided that each copy
58-contains the above copyright notice and this license. These can be
59-included either as stand-alone text files, human-readable headers or
60-in the appropriate machine-readable metadata fields within text or
61-binary files as long as those fields can be easily viewed by the user.
62-
63-3) No Modified Version of the Font Software may use the Reserved Font
64-Name(s) unless explicit written permission is granted by the corresponding
65-Copyright Holder. This restriction only applies to the primary font name as
66-presented to the users.
67-
68-4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69-Software shall not be used to promote, endorse or advertise any
70-Modified Version, except to acknowledge the contribution(s) of the
71-Copyright Holder(s) and the Author(s) or with their explicit written
72-permission.
73-
74-5) The Font Software, modified or unmodified, in part or in whole,
75-must be distributed entirely under this license, and must not be
76-distributed under any other license. The requirement for fonts to
77-remain under this license does not apply to any document created
78-using the Font Software.
79-
80-TERMINATION
81-This license becomes null and void if any of the above conditions are
82-not met.
83-
84-DISCLAIMER
85-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93-OTHER DEALINGS IN THE FONT SOFTWARE.
1+Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2+
3+This Font Software is licensed under the SIL Open Font License, Version 1.1.
4+This license is copied below, and is also available with a FAQ at:
5+https://scripts.sil.org/OFL
6+
7+
8+-----------------------------------------------------------
9+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10+-----------------------------------------------------------
11+
12+PREAMBLE
13+The goals of the Open Font License (OFL) are to stimulate worldwide
14+development of collaborative font projects, to support the font creation
15+efforts of academic and linguistic communities, and to provide a free and
16+open framework in which fonts may be shared and improved in partnership
17+with others.
18+
19+The OFL allows the licensed fonts to be used, studied, modified and
20+redistributed freely as long as they are not sold by themselves. The
21+fonts, including any derivative works, can be bundled, embedded,
22+redistributed and/or sold with any software provided that any reserved
23+names are not used by derivative works. The fonts and derivatives,
24+however, cannot be released under any other type of license. The
25+requirement for fonts to remain under this license does not apply
26+to any document created using the fonts or their derivatives.
27+
28+DEFINITIONS
29+"Font Software" refers to the set of files released by the Copyright
30+Holder(s) under this license and clearly marked as such. This may
31+include source files, build scripts and documentation.
32+
33+"Reserved Font Name" refers to any names specified as such after the
34+copyright statement(s).
35+
36+"Original Version" refers to the collection of Font Software components as
37+distributed by the Copyright Holder(s).
38+
39+"Modified Version" refers to any derivative made by adding to, deleting,
40+or substituting -- in part or in whole -- any of the components of the
41+Original Version, by changing formats or by porting the Font Software to a
42+new environment.
43+
44+"Author" refers to any designer, engineer, programmer, technical
45+writer or other person who contributed to the Font Software.
46+
47+PERMISSION & CONDITIONS
48+Permission is hereby granted, free of charge, to any person obtaining
49+a copy of the Font Software, to use, study, copy, merge, embed, modify,
50+redistribute, and sell modified and unmodified copies of the Font
51+Software, subject to the following conditions:
52+
53+1) Neither the Font Software nor any of its individual components,
54+in Original or Modified Versions, may be sold by itself.
55+
56+2) Original or Modified Versions of the Font Software may be bundled,
57+redistributed and/or sold with any software, provided that each copy
58+contains the above copyright notice and this license. These can be
59+included either as stand-alone text files, human-readable headers or
60+in the appropriate machine-readable metadata fields within text or
61+binary files as long as those fields can be easily viewed by the user.
62+
63+3) No Modified Version of the Font Software may use the Reserved Font
64+Name(s) unless explicit written permission is granted by the corresponding
65+Copyright Holder. This restriction only applies to the primary font name as
66+presented to the users.
67+
68+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69+Software shall not be used to promote, endorse or advertise any
70+Modified Version, except to acknowledge the contribution(s) of the
71+Copyright Holder(s) and the Author(s) or with their explicit written
72+permission.
73+
74+5) The Font Software, modified or unmodified, in part or in whole,
75+must be distributed entirely under this license, and must not be
76+distributed under any other license. The requirement for fonts to
77+remain under this license does not apply to any document created
78+using the Font Software.
79+
80+TERMINATION
81+This license becomes null and void if any of the above conditions are
82+not met.
83+
84+DISCLAIMER
85+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93+OTHER DEALINGS IN THE FONT SOFTWARE.
assets/fonts/JetBrainsMono-Medium.ttf+0-0

Binary file, not shown.

assets/fonts/JetBrainsMono-Regular.ttf+0-0

Binary file, not shown.

src/agent/mod.rs+2-2
@@ -17,8 +17,8 @@ impl Agent {
1717
1818 pub fn label(self) -> &'static str {
1919 match self {
20- Agent::Claude => "CLAUDE",
21- Agent::Opencode => "OPENCODE",
20+ Agent::Claude => "claude",
21+ Agent::Opencode => "opencode",
2222 }
2323 }
2424 }
src/app/chrome.rs+74-104
@@ -1,24 +1,23 @@
11 use crate::app::App;
22 use crate::app::tabs::Tab;
33 use crate::ui::theme::{self, pal};
4-use crate::ui::widgets::mono;
4+use crate::ui::widgets::{mono, tab};
55 use crate::vm::Vm;
66 use crate::{editor, exec, paths, settings, workflow, workspace};
7-use rune::{Cx, El, col, el, row, text};
7+use rune::{Cx, El, col, row, text};
88 use rune_kit::Kit;
99
1010 pub const SIDE: f32 = 214.0;
1111
1212 pub fn frame(s: &App, k: &Kit, _cx: &mut Cx<App>, layer: &mut Vec<El>) -> El {
13- let tab = s.tab().clone();
14- let side = match &tab {
15- Tab::Welcome => el(),
16- Tab::Settings => settings::view::side(),
17- Tab::Prompt(stem) => workspace::sidebar::view(s, Some(stem)),
18- Tab::Workflow(stem) | Tab::Task(stem) => workflow::steps::view(s, stem, false),
19- Tab::Run(stem) => workflow::steps::view(s, stem, true),
13+ let active = s.tab().clone();
14+ let side = match &active {
15+ Tab::Welcome | Tab::Settings => None,
16+ Tab::Prompt(stem) => Some(workspace::sidebar::view(s, Some(stem))),
17+ Tab::Workflow(stem) | Tab::Task(stem) => Some(workflow::steps::view(s, stem, false)),
18+ Tab::Run(stem) => Some(workflow::steps::view(s, stem, true)),
2019 };
21- let main = match &tab {
20+ let main = match &active {
2221 Tab::Welcome => workspace::welcome::view(s),
2322 Tab::Settings => settings::view::view(s, k),
2423 Tab::Prompt(stem) => editor::view::view(s, stem, k, layer),
@@ -26,120 +25,91 @@ pub fn frame(s: &App, k: &Kit, _cx: &mut Cx<App>, layer: &mut Vec<El>) -> El {
2625 Tab::Task(stem) => workflow::task_view::view(s, stem, k),
2726 Tab::Run(stem) => exec::view::view(s, stem),
2827 };
29- col()
30- .w_full()
31- .h_full()
32- .child(tabs(s))
33- .child(
34- row()
35- .grow(1.0)
36- .min_h(0.0)
37- .child(
38- side.w(SIDE)
39- .h_full()
40- .fill(pal().panel)
41- .border_sides([0.0, 1.0, 0.0, 0.0], pal().border)
42- .clip_rounded(0.0),
43- )
44- .child(
45- col()
46- .grow(1.0)
47- .min_w(0.0)
48- .h_full()
49- .child(main.grow(1.0).min_h(0.0)),
50- ),
51- )
52- .child(status(s))
28+ let tabs = s.tabs.iter().enumerate().map(|(i, t)| {
29+ let close = text("×")
30+ .font(theme::SMALL)
31+ .color(pal().faint)
32+ .role("button")
33+ .label("Close tab")
34+ .focusable(true)
35+ .cursor(rune::Cursor::Pointer)
36+ .on_press(move |s: &mut App| s.close(i));
37+ tab(&t.label(s), i == s.active)
38+ .key(format!("tab-{i}"))
39+ .focusable(true)
40+ .cursor(rune::Cursor::Pointer)
41+ .on_press(move |s: &mut App| s.active = i)
42+ .child(close)
43+ });
44+ shell(tabs.collect(), side, main, status(s))
5345 }
5446
55-fn tabs(s: &App) -> El {
47+pub fn shell(tabs: Vec<El>, side: Option<El>, main: El, status: El) -> El {
5648 let p = pal();
5749 let brand = row()
5850 .w(SIDE)
5951 .h_full()
6052 .px(12.0)
6153 .center_y()
62- .border_sides([0.0, 1.0, 0.0, 0.0], p.border)
63- .child(
64- text("▲ CAST")
65- .font(theme::MONO.tracking(1.0))
66- .color(p.accent),
67- );
68- row()
69- .h(34.0)
54+ .child(text("▲ cast").font(theme::MONO).color(p.accent));
55+ let mut body = row().grow(1.0).min_h(0.0);
56+ if let Some(side) = side {
57+ body = body.child(side.w(SIDE).h_full().fill(p.surface).clip_rounded(0.0));
58+ }
59+ col()
7060 .w_full()
71- .fill(p.panel)
72- .border_sides([0.0, 0.0, 1.0, 0.0], p.border)
73- .child(brand)
74- .children(s.tabs.iter().enumerate().map(|(i, t)| {
75- let on = i == s.active;
76- let close = text("×")
77- .font(theme::MONO)
78- .color(p.faint)
79- .cursor(rune::Cursor::Pointer)
80- .on_press(move |s: &mut App| s.close(i));
81- let r = row()
82- .key(format!("tab-{i}"))
83- .h_full()
84- .px(14.0)
85- .gap(10.0)
61+ .h_full()
62+ .child(
63+ row()
64+ .h(32.0)
65+ .w_full()
66+ .fill(p.surface)
67+ .child(brand)
68+ .children(tabs),
69+ )
70+ .child(
71+ body.child(
72+ col()
73+ .grow(1.0)
74+ .min_w(0.0)
75+ .h_full()
76+ .child(main.grow(1.0).min_h(0.0)),
77+ ),
78+ )
79+ .child(
80+ row()
81+ .h(24.0)
82+ .w_full()
83+ .px(12.0)
84+ .gap(16.0)
85+ .fill(p.surface)
8686 .center_y()
87- .border_sides([0.0, 1.0, 0.0, 0.0], p.border)
88- .cursor(rune::Cursor::Pointer)
89- .on_press(move |s: &mut App| s.active = i)
90- .child(text(t.label(s)).font(theme::MONO_SM).color(if on {
91- p.white
92- } else {
93- p.muted
94- }))
95- .child(close);
96- if on {
97- r.fill(p.card).border_sides([2.0, 1.0, 0.0, 0.0], p.accent)
98- } else {
99- r
100- }
101- }))
87+ .child(status),
88+ )
10289 }
10390
10491 fn status(s: &App) -> El {
10592 let p = pal();
106- let agent = s
107- .tab()
108- .stem()
109- .and_then(|stem| s.editors.iter().find(|e| e.stem == stem))
110- .map_or(s.cfg.default_agent, |e| e.agent);
11193 let vm = match &s.vm {
112- Vm::Off => mono("○ VM OFF", p.muted),
113- Vm::Booting => mono("◐ VM BOOTING", p.accent),
114- Vm::Ready(_) => mono("● VM RUNNING", p.ok),
115- Vm::Failed(e) => mono(format!("✕ VM {e}"), p.red),
116- };
117- let mut left = row()
118- .gap(16.0)
119- .center_y()
120- .child(mono(format!("AGENT: {}", agent.label()), p.blue));
121- left = match &s.ws {
122- Some(ws) => left
123- .child(mono(paths::tilde(&ws.dir), p.text))
124- .child(vm)
125- .child(mono("MOUNTED AT /work", p.muted)),
126- None => left.child(mono("NO DIRECTORY OPEN", p.muted)).child(vm),
94+ Vm::Off => mono("○ VM off", p.muted),
95+ Vm::Booting => mono("◐ VM booting", p.accent),
96+ Vm::Ready(_) => mono("● VM running", p.ok),
97+ Vm::Failed(e) => mono(format!("✕ VM {e}"), p.danger),
12798 };
99+ let mut left = row().gap(16.0).center_y().child(match &s.ws {
100+ Some(ws) => mono(paths::tilde(&ws.dir), p.fg),
101+ None => mono("No directory open", p.muted),
102+ });
103+ left = left.child(vm);
128104 if let Some(n) = &s.notice {
129105 left = left.child(
130- mono(format!("✕ {n}"), p.red)
106+ mono(format!("✕ {n}"), p.danger)
107+ .role("button")
108+ .label("Dismiss")
109+ .focusable(true)
131110 .cursor(rune::Cursor::Pointer)
132111 .on_press(|s: &mut App| s.notice = None),
133112 );
134113 }
135- row()
136- .h(24.0)
137- .w_full()
138- .px(10.0)
139- .fill(p.panel)
140- .border_sides([1.0, 0.0, 0.0, 0.0], p.border)
141- .center_y()
142- .justify_between()
143- .child(left)
144- .child(mono("CAST 0.1", p.muted))
114+ left
145115 }
src/app/mod.rs+1-1
@@ -1,5 +1,5 @@
11 pub mod bus;
2-mod chrome;
2+pub mod chrome;
33 mod events;
44 mod keys;
55 pub mod tabs;
src/app/tabs.rs+3-10
@@ -13,8 +13,8 @@ pub enum Tab {
1313 impl Tab {
1414 pub fn label(&self, s: &App) -> String {
1515 match self {
16- Tab::Welcome => "WELCOME".into(),
17- Tab::Settings => "⚙ SETTINGS".into(),
16+ Tab::Welcome => "Welcome".into(),
17+ Tab::Settings => "⚙ Settings".into(),
1818 Tab::Prompt(stem) => {
1919 let dirty = s.editors.iter().any(|e| &e.stem == stem && e.dirty());
2020 format!("◆ {}{}", s.title(stem), if dirty { " ●" } else { "" })
@@ -28,7 +28,7 @@ impl Tab {
2828 "✎ {}",
2929 s.review(stem)
3030 .and_then(|r| r.wf.tasks.get(r.selected))
31- .map_or("TASK", |t| t.id.as_str())
31+ .map_or("Task", |t| t.id.as_str())
3232 ),
3333 Tab::Run(stem) => format!(
3434 "▶ {} v{}",
@@ -40,13 +40,6 @@ impl Tab {
4040 ),
4141 }
4242 }
43-
44- pub fn stem(&self) -> Option<&str> {
45- match self {
46- Tab::Prompt(s) | Tab::Workflow(s) | Tab::Task(s) | Tab::Run(s) => Some(s),
47- _ => None,
48- }
49- }
5043 }
5144
5245 impl App {
src/editor/highlight.rs+11-14
@@ -7,23 +7,20 @@ pub fn spans(text: &str, ghost: Option<(usize, usize)>) -> Vec<Span> {
77 for line in text.split_inclusive('\n') {
88 let body = line.trim_end_matches('\n');
99 let t = body.trim_start();
10- let color = if t.starts_with("```") {
10+ let heading = !fence && t.starts_with('#');
11+ let muted = if t.starts_with("```") {
1112 fence = !fence;
12- Some(p.ok)
13- } else if fence {
14- Some(p.ok)
15- } else if t.starts_with('#') {
16- Some(p.accent)
17- } else if t.starts_with("![") || t.starts_with("[![") {
18- Some(p.blue)
19- } else if t.starts_with('>') {
20- Some(p.muted)
13+ true
2114 } else {
22- None
15+ fence || t.starts_with("![") || t.starts_with("[![") || t.starts_with('>')
2316 };
24- if let (Some(c), false) = (color, body.is_empty()) {
25- out.push(Span::new(pos, pos + body.len()).color(c));
17+ let span = Span::new(pos, pos + body.len());
18+ if !body.is_empty() && heading {
19+ out.push(span.color(p.strong).weight(500.0));
20+ } else if !body.is_empty() && muted {
21+ out.push(span.color(p.muted));
2622 }
23+
2724 pos += line.len();
2825 }
2926 if let Some((a, b)) = ghost.filter(|(a, b)| a < b && *b <= text.len()) {
@@ -35,7 +32,7 @@ pub fn spans(text: &str, ghost: Option<(usize, usize)>) -> Vec<Span> {
3532 #[cfg(test)]
3633 mod tests {
3734 #[test]
38- fn colors_headings_fences_and_images() {
35+ fn styles_headings_fences_and_images() {
3936 let s = super::spans(
4037 "# Title\ntext\n```\ncode\n```\n![a](b.png)\n",
4138 Some((8, 12)),
src/editor/view.rs+52-48
@@ -3,7 +3,7 @@ use crate::app::App;
33 use crate::editor::assist::Assist;
44 use crate::editor::{Editor, highlight};
55 use crate::ui::theme::{self, pal};
6-use crate::ui::widgets::{Kind, btn, chip, chip_btn, chip_tx, lbl, mono, ph};
6+use crate::ui::widgets::{Kind, btn, btn_tx, lbl, mono, ph};
77 use rune::{El, Key, col, el, row, text, text_input};
88 use rune_kit::{Kit, Markdown};
99
@@ -30,32 +30,30 @@ fn toolbar(e: &Editor) -> El {
3030 };
3131 let (img, vid) = (e.stem.clone(), e.stem.clone());
3232 let chips = row()
33- .gap(6.0)
33+ .gap(4.0)
3434 .center_y()
35- .child(chip_btn("B", st(|s, k| s.wrap(k, "**"))))
36- .child(chip_btn("I", st(|s, k| s.wrap(k, "*"))))
37- .child(chip_btn("H", st(|s, k| s.heading(k))))
38- .child(chip_tx("IMG", move |s: &mut App, tx| {
35+ .child(btn("B", Kind::Ghost, Some(st(|s, k| s.wrap(k, "**")))))
36+ .child(btn("I", Kind::Ghost, Some(st(|s, k| s.wrap(k, "*")))))
37+ .child(btn("H", Kind::Ghost, Some(st(|s, k| s.heading(k)))))
38+ .child(btn_tx("Image", Kind::Ghost, move |s: &mut App, tx| {
3939 s.pick_media(&img, false, tx)
4040 }))
41- .child(chip_btn("GRAPH", st(|s, k| s.graph(k))))
42- .child(chip_tx("VIDEO", move |s: &mut App, tx| {
41+ .child(btn("Graph", Kind::Ghost, Some(st(|s, k| s.graph(k)))))
42+ .child(btn_tx("Video", Kind::Ghost, move |s: &mut App, tx| {
4343 s.pick_media(&vid, true, tx)
4444 }))
45- .child(mono("⌃V RICH PASTE · ⌃K ASSIST", p.muted).ml(6.0));
45+ .child(mono("⌃V rich paste · ⌃K assist", p.faint).ml(8.0));
4646 let next = if e.agent == Agent::Claude {
4747 Agent::Opencode
4848 } else {
4949 Agent::Claude
5050 };
51- let agent = chip(
52- row()
53- .child(mono("AGENT: ", p.text))
54- .child(mono(format!("{} ▾", e.agent.label()), p.blue)),
51+ let agent = btn(
52+ &format!("{} ▾", e.agent.label()),
53+ Kind::Ghost,
54+ Some(st_agent(&e.stem, next)),
5555 )
56- .key("agent-toggle")
57- .cursor(rune::Cursor::Pointer)
58- .on_press(st_agent(&e.stem, next));
56+ .key("agent-toggle");
5957 let action = match e.generating {
6058 Some(_) => row()
6159 .gap(8.0)
@@ -65,7 +63,7 @@ fn toolbar(e: &Editor) -> El {
6563 format!(
6664 "◐ {}",
6765 if e.activity.is_empty() {
68- "GENERATING…"
66+ "Generating…"
6967 } else {
7068 &e.activity
7169 }
@@ -88,14 +86,13 @@ fn toolbar(e: &Editor) -> El {
8886 .key("generate"),
8987 };
9088 row()
91- .px(8.0)
92- .py(8.0)
93- .fill(p.panel)
94- .border_sides([0.0, 0.0, 1.0, 0.0], p.border)
89+ .h(40.0)
90+ .px(12.0)
91+ .fill(p.surface)
9592 .center_y()
9693 .justify_between()
9794 .child(chips)
98- .child(row().gap(12.0).center_y().child(agent).child(action))
95+ .child(row().gap(8.0).center_y().child(agent).child(action))
9996 }
10097
10198 fn st_agent(stem: &str, next: Agent) -> impl Fn(&mut App) + 'static {
@@ -120,11 +117,11 @@ fn source(e: &Editor) -> El {
120117 e.stem.clone(),
121118 e.stem.clone(),
122119 );
123- let field = text_input(&e.edit, theme::EDITOR)
120+ let field = text_input(&e.edit, theme::MONO)
124121 .label("Prompt source")
125122 .key("source")
126123 .w_full()
127- .color(p.text)
124+ .color(p.fg)
128125 .caret(p.accent, p.selection)
129126 .decorations(highlight::spans(&e.edit.text, ghost))
130127 .on_edit(move |s: &mut App| s.edit_of(&a))
@@ -136,7 +133,7 @@ fn source(e: &Editor) -> El {
136133 .grow(1.0)
137134 .min_w(0.0)
138135 .h_full()
139- .border_sides([0.0, 1.0, 0.0, 0.0], p.border)
136+ .border_sides([0.0, 1.0, 0.0, 0.0], p.line)
140137 .child(ph(lbl("Source"), lbl("md")))
141138 .child(
142139 col()
@@ -186,6 +183,7 @@ fn preview(s: &App, e: &Editor, k: &Kit) -> El {
186183 })
187184 .on_link(|s: &mut App, url| s.open_link(url))
188185 .selectable(true)
186+ .style(theme::markdown(k))
189187 .build(k);
190188 col()
191189 .grow(1.0)
@@ -197,7 +195,7 @@ fn preview(s: &App, e: &Editor, k: &Kit) -> El {
197195 .key("preview-scroll")
198196 .grow(1.0)
199197 .min_h(0.0)
200- .fill(p.panel)
198+ .fill(p.surface)
201199 .scroll(rune::ScrollSpec {
202200 stick_bottom: false,
203201 })
@@ -215,11 +213,11 @@ fn popover(e: &Editor, k: &Kit) -> Option<El> {
215213 let span = |(a, b): (usize, usize)| {
216214 let (la, lb) = (line_of(text_, a), line_of(text_, b));
217215 if a == b {
218- format!("GENERATE AT L{la}")
216+ format!("Generate at L{la}")
219217 } else if la == lb {
220- format!("EDIT L{la}")
218+ format!("Edit L{la}")
221219 } else {
222- format!("EDIT L{la}–{lb}")
220+ format!("Edit L{la}–{lb}")
223221 }
224222 };
225223 let stem = e.stem.clone();
@@ -229,7 +227,9 @@ fn popover(e: &Editor, k: &Kit) -> Option<El> {
229227 let (a, b, c) = (stem.clone(), stem.clone(), stem.clone());
230228 let field = rune_kit::TextInput::new(input)
231229 .placeholder("tell the agent what to write or change")
232- .text_style(theme::UI)
230+ .text_style(theme::BODY)
231+ .height(24.0)
232+ .width(None)
233233 .on_edit(move |s: &mut App| s.assist_input(&a))
234234 .on_submit(move |s: &mut App, _| s.assist_send(&b))
235235 .on_key(move |s: &mut App, ev, _| {
@@ -245,14 +245,14 @@ fn popover(e: &Editor, k: &Kit) -> Option<El> {
245245 .gap(6.0)
246246 .child(
247247 row()
248+ .w_full()
248249 .gap(6.0)
249250 .center_y()
250251 .child(text("✦").font(theme::MONO).color(p.accent))
251- .child(field.grow(1.0))
252- .child(chip(mono("⏎", p.text))),
252+ .child(field.grow(1.0)),
253253 )
254254 .child(mono(
255- format!("{} · ⏎ SEND · ESC CLOSE", span(*range)),
255+ format!("{} · ⏎ send · esc close", span(*range)),
256256 p.muted,
257257 ))
258258 }
@@ -266,17 +266,17 @@ fn popover(e: &Editor, k: &Kit) -> Option<El> {
266266 .child(
267267 mono(
268268 if e.activity.is_empty() {
269- "WRITING…"
269+ "Writing…"
270270 } else {
271271 &e.activity
272272 },
273- p.text,
273+ p.fg,
274274 )
275275 .truncate()
276276 .grow(1.0),
277277 ),
278278 )
279- .child(mono(format!("{} · ESC CANCEL", span(*range)), p.muted)),
279+ .child(mono(format!("{} · esc cancel", span(*range)), p.muted)),
280280 Assist::Proposed { range, .. } => {
281281 let (a, b) = (stem.clone(), stem.clone());
282282 row()
@@ -286,7 +286,7 @@ fn popover(e: &Editor, k: &Kit) -> Option<El> {
286286 .child(
287287 mono(
288288 format!(
289- "PROPOSED L{}–{}",
289+ "Proposed L{}–{}",
290290 line_of(text_, range.0),
291291 line_of(text_, range.1)
292292 ),
@@ -294,12 +294,16 @@ fn popover(e: &Editor, k: &Kit) -> Option<El> {
294294 )
295295 .grow(1.0),
296296 )
297- .child(chip_btn("TAB ACCEPT", move |s: &mut App| {
298- s.assist_accept(&a)
299- }))
300- .child(chip_btn("ESC DISMISS", move |s: &mut App| {
301- s.assist_close(&b)
302- }))
297+ .child(btn(
298+ "Tab accept",
299+ Kind::Ghost,
300+ Some(move |s: &mut App| s.assist_accept(&a)),
301+ ))
302+ .child(btn(
303+ "Esc dismiss",
304+ Kind::Ghost,
305+ Some(move |s: &mut App| s.assist_close(&b)),
306+ ))
303307 }
304308 };
305309 let pop = el()
@@ -307,11 +311,11 @@ fn popover(e: &Editor, k: &Kit) -> Option<El> {
307311 .absolute(24.0, 40.0)
308312 .w(380.0)
309313 .padding(8.0)
310- .fill(p.card)
311- .border(1.0, p.accent)
312- .radius(6.0)
313- .shadow(8.0, 30.0, rune::Color::BLACK.alpha(0.6))
314- .child(body);
314+ .fill(p.raised)
315+ .border(1.0, p.line)
316+ .radius(4.0)
317+ .shadow(8.0, 30.0, p.shadow)
318+ .child(body.w_full());
315319 Some(match &e.assist {
316320 Assist::Waiting { .. } => pop.on_key({
317321 let stem = stem.clone();
src/exec/run.rs+1-1
@@ -144,7 +144,7 @@ impl App {
144144 r.logs[i].push(format!(
145145 "▶ {} started on {}",
146146 r.wf.tasks[i].id,
147- agent.label().to_lowercase()
147+ agent.label()
148148 ));
149149 r.view = i;
150150 }
src/exec/view.rs+57-76
@@ -3,7 +3,7 @@ use crate::exec::machine::{Control, Phase, Status};
33 use crate::exec::run::Run;
44 use crate::paths;
55 use crate::ui::theme::{self, pal};
6-use crate::ui::widgets::{Kind, bar, btn, chip_btn, lbl, mono, stat};
6+use crate::ui::widgets::{Kind, bar, btn, lbl, mono, stat};
77 use crate::workflow::dag::{self, Look};
88 use crate::workflow::details;
99 use rune::{El, col, row, text};
@@ -11,13 +11,13 @@ use rune::{El, col, row, text};
1111 fn phase_label(p: Phase) -> (&'static str, rune::Color) {
1212 let c = pal();
1313 match p {
14- Phase::Ready => ("READY", c.muted),
15- Phase::Running => ("RUNNING", c.ok),
16- Phase::Pausing => ("PAUSING", c.accent),
17- Phase::Paused => ("PAUSED", c.accent),
18- Phase::Failed => ("FAILED", c.red),
19- Phase::Cancelled => ("CANCELLED", c.red),
20- Phase::Done => ("DONE", c.ok),
14+ Phase::Ready => ("ready", c.muted),
15+ Phase::Running => ("running", c.ok),
16+ Phase::Pausing => ("pausing", c.accent),
17+ Phase::Paused => ("paused", c.accent),
18+ Phase::Failed => ("failed", c.danger),
19+ Phase::Cancelled => ("cancelled", c.danger),
20+ Phase::Done => ("done", c.ok),
2121 }
2222 }
2323
@@ -38,16 +38,16 @@ pub fn view(s: &App, stem: &str) -> El {
3838 };
3939 let idle = !matches!(phase, Phase::Running | Phase::Pausing | Phase::Done);
4040 let controls = row()
41- .gap(6.0)
42- .padding(8.0)
41+ .h(40.0)
42+ .px(12.0)
43+ .gap(8.0)
4344 .center_y()
44- .fill(p.panel)
45- .border_sides([0.0, 0.0, 1.0, 0.0], p.border)
45+ .fill(p.surface)
4646 .child(ctl("▶ Run all", Kind::Primary, Control::All, idle))
47- .child(ctl("⏭ Next task", Kind::Normal, Control::NextTask, idle))
47+ .child(ctl("› Next task", Kind::Normal, Control::NextTask, idle))
4848 .child(ctl("» Next step", Kind::Normal, Control::NextStep, idle))
4949 .child(ctl(
50- "⏸ Pause",
50+ "‖ Pause",
5151 Kind::Normal,
5252 Control::Pause,
5353 phase == Phase::Running,
@@ -59,21 +59,21 @@ pub fn view(s: &App, stem: &str) -> El {
5959 matches!(phase, Phase::Running | Phase::Pausing),
6060 ))
6161 .child(row().grow(1.0))
62- .child(mono("PAUSE STOPS NEW TASKS FROM STARTING", p.muted));
62+ .child(mono("Pause stops new tasks from starting", p.faint));
6363 let (label, color) = phase_label(phase);
6464 let steps = r.wf.steps().len();
6565 let step = r.machine.current_step().unwrap_or(steps as u32);
6666 let pct = r.progress();
6767 let stats = row()
6868 .h(52.0)
69- .border_sides([0.0, 0.0, 1.0, 0.0], p.border)
69+ .fill(p.surface)
7070 .child(stat(&format!("{:.0}%", pct * 100.0), "progress", p.accent))
7171 .child(stat(
7272 &format!("{}/{}", r.machine.count(Status::Done), r.wf.tasks.len()),
7373 "tasks done",
74- p.white,
74+ p.strong,
7575 ))
76- .child(stat(&format!("{step}/{steps}"), "step", p.white))
76+ .child(stat(&format!("{step}/{steps}"), "step", p.strong))
7777 .child(stat(label, "state", color));
7878 let st = stem.to_string();
7979 let clock = s.now();
@@ -111,7 +111,7 @@ pub fn view(s: &App, stem: &str) -> El {
111111 .key("run-task")
112112 .max_h(260.0)
113113 .padding(16.0)
114- .border_sides([1.0, 0.0, 0.0, 0.0], p.border)
114+ .border_sides([1.0, 0.0, 0.0, 0.0], p.line)
115115 .scroll(rune::ScrollSpec {
116116 stick_bottom: false,
117117 })
@@ -122,96 +122,77 @@ pub fn view(s: &App, stem: &str) -> El {
122122
123123 fn terminal(s: &App, r: &Run, stem: &str) -> El {
124124 let p = pal();
125- let tabs = row()
126- .fill(p.panel)
127- .border_sides([0.0, 0.0, 1.0, 0.0], p.border)
128- .children(
129- r.wf.tasks
130- .iter()
131- .enumerate()
132- .filter(|(i, _)| r.machine.status[*i] != Status::Queued || *i == r.view)
133- .map(|(i, t)| {
134- let st = stem.to_string();
135- let on = i == r.view;
136- let tab = row()
137- .key(format!("log-tab-{}", t.id))
138- .h(28.0)
139- .px(14.0)
140- .center_y()
141- .border_sides(
142- [if on { 2.0 } else { 0.0 }, 1.0, 0.0, 0.0],
143- if on { p.accent } else { p.border },
144- )
145- .cursor(rune::Cursor::Pointer)
146- .on_press(move |s: &mut App| {
147- if let Some(r) = s.runs.iter_mut().find(|r| r.wf.prompt == st) {
148- r.view = i;
149- }
150- })
151- .child(mono(
152- format!("{} OUTPUT", t.id),
153- if on { p.white } else { p.muted },
154- ));
155- if on { tab.fill(p.card) } else { tab }
156- }),
157- );
158- let id = r.wf.tasks[r.view].id.clone();
125+ let tabs = row().h(28.0).fill(p.surface).children(
126+ r.wf.tasks
127+ .iter()
128+ .enumerate()
129+ .filter(|(i, _)| r.machine.status[*i] != Status::Queued || *i == r.view)
130+ .map(|(i, t)| {
131+ let st = stem.to_string();
132+ let on = i == r.view;
133+ crate::ui::widgets::tab(&format!("{} output", t.id), on)
134+ .key(format!("log-tab-{}", t.id))
135+ .focusable(true)
136+ .cursor(rune::Cursor::Pointer)
137+ .on_press(move |s: &mut App| {
138+ if let Some(r) = s.runs.iter_mut().find(|r| r.wf.prompt == st) {
139+ r.view = i;
140+ }
141+ })
142+ }),
143+ );
159144 let lines = r.logs[r.view].iter().map(|l| {
160145 let color = if l.starts_with('✓') {
161146 p.ok
162147 } else if l.starts_with('✕') {
163- p.red
148+ p.danger
164149 } else if l.starts_with('$') {
165- p.text
150+ p.fg
166151 } else {
167152 p.muted
168153 };
169- row().gap(12.0).child(mono(id.clone(), p.accent)).child(
170- text(l.clone())
171- .font(theme::MONO_SM)
172- .color(color)
173- .wrap()
174- .selectable(true)
175- .grow(1.0)
176- .min_w(0.0),
177- )
154+ text(l.clone())
155+ .font(theme::MONO)
156+ .color(color)
157+ .wrap()
158+ .selectable(true)
159+ .w_full()
178160 });
179- let mut log = col()
180- .padding(8.0)
181- .gap(2.0)
182- .selection_group(true)
183- .children(lines);
161+ let mut log = col().padding(8.0).selection_group(true).children(lines);
184162 if r.machine.status[r.view] == Status::Running {
185163 log = log.child(mono("▍", p.accent));
186164 }
187165 let dir = r.evidence_dir(r.view);
188166 let files = r.evidence[r.view].iter().map(|f| {
189167 let path = format!("{dir}/{f}");
190- chip_btn(f, move |s: &mut App| s.open_link(&path)).max_w(204.0)
168+ btn(f, Kind::Ghost, Some(move |s: &mut App| s.open_link(&path)))
169+ .min_w(0.0)
170+ .max_w(204.0)
191171 });
192172 let side = col()
193173 .w(220.0)
194174 .padding(8.0)
195- .gap(6.0)
196- .border_sides([0.0, 0.0, 0.0, 1.0], p.border)
175+ .gap(8.0)
176+ .fill(p.surface)
197177 .child(lbl(&format!(
198178 "Attached evidence · {}",
199179 r.evidence[r.view].len()
200180 )))
201- .child(row().gap(6.0).flex_wrap().children(files))
181+ .child(row().gap(4.0).flex_wrap().children(files))
202182 .child(
203183 mono(
204184 s.ws.as_ref()
205185 .map_or(dir.clone(), |w| paths::tilde(&w.resolve(&dir))),
206186 p.faint,
207187 )
208- .wrap(),
188+ .truncate_middle()
189+ .min_w(0.0),
209190 );
210191 col()
211192 .grow(1.0)
212193 .min_h(140.0)
213- .fill(p.term)
214- .border_sides([1.0, 0.0, 0.0, 0.0], p.border)
194+ .fill(p.bg)
195+ .border_sides([1.0, 0.0, 0.0, 0.0], p.line)
215196 .child(tabs)
216197 .child(
217198 row()
src/main.rs+3-4
@@ -17,15 +17,14 @@ use rune::AppSpec;
1717 const FONTS: &[&[u8]] = &[
1818 include_bytes!("../assets/fonts/Inter-Regular.ttf"),
1919 include_bytes!("../assets/fonts/Inter-Medium.ttf"),
20- include_bytes!("../assets/fonts/Inter-SemiBold.ttf"),
21- include_bytes!("../assets/fonts/IBMPlexMono-Regular.ttf"),
22- include_bytes!("../assets/fonts/IBMPlexMono-Medium.ttf"),
20+ include_bytes!("../assets/fonts/JetBrainsMono-Regular.ttf"),
21+ include_bytes!("../assets/fonts/JetBrainsMono-Medium.ttf"),
2322 ];
2423
2524 fn main() {
2625 rune::run(AppSpec {
2726 fonts: FONTS,
28- families: ("Inter", "IBM Plex Mono"),
27+ families: ("Inter", "JetBrains Mono"),
2928 setup: Some(App::setup),
3029 poll: Some(App::poll),
3130 on_key: Some(app::on_key),
src/settings/view.rs+26-44
@@ -2,46 +2,35 @@ use crate::agent::Agent;
22 use crate::app::App;
33 use crate::paths;
44 use crate::ui::theme::{self, pal};
5-use crate::ui::widgets::{Kind, btn, card, hd, input, item, lbl, mono, seg};
5+use crate::ui::widgets::{Kind, btn, input, link, mono, section, seg};
66 use crate::vm::bake;
77 use crate::workspace::Workspace;
88 use rune::{El, TextEdit, col, el, row, text};
99 use rune_kit::Kit;

Cut short: this commit's diff is over 1000 lines.

src/setup/view.rs+26-77

Cut short: this commit's diff is over 1000 lines.

src/ui/theme.rs+56-41

Cut short: this commit's diff is over 1000 lines.

src/ui/widgets.rs+66-83

Cut short: this commit's diff is over 1000 lines.

src/workflow/dag.rs+17-10

Cut short: this commit's diff is over 1000 lines.

src/workflow/details.rs+14-17

Cut short: this commit's diff is over 1000 lines.

src/workflow/review.rs+27-32

Cut short: this commit's diff is over 1000 lines.

src/workflow/steps.rs+8-11

Cut short: this commit's diff is over 1000 lines.

src/workflow/task_view.rs+33-28

Cut short: this commit's diff is over 1000 lines.

src/workspace/sidebar.rs+19-25

Cut short: this commit's diff is over 1000 lines.

src/workspace/welcome.rs+36-35

Cut short: this commit's diff is over 1000 lines.