Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
8ad553b
start on new recording flow
Brendonovich Jun 17, 2025
4cd43df
more work
Brendonovich Jun 23, 2025
9701625
some area selection
Brendonovich Jun 24, 2025
ac975f3
progress on window selection
Brendonovich Jun 24, 2025
1ccf765
Merge remote-tracking branch 'origin' into new-recording-flow
oscartbeaumont Aug 4, 2025
37d6a98
fix `createLicenseQuery`'s key
oscartbeaumont Aug 4, 2025
41df3a2
format
oscartbeaumont Aug 4, 2025
8bad974
windows wip[
oscartbeaumont Aug 5, 2025
d6fbc87
Merge remote-tracking branch 'origin' into new-recording-flow
oscartbeaumont Aug 5, 2025
e9bfd05
wip
oscartbeaumont Aug 5, 2025
85ccd84
escape to close overlay
oscartbeaumont Aug 5, 2025
eb31fd7
allow deselecting the capture
oscartbeaumont Aug 5, 2025
2ac09b9
wip
oscartbeaumont Aug 5, 2025
6ca4850
Merge branch 'new-recording-flow' of https://github.com/CapSoftware/C…
oscartbeaumont Aug 5, 2025
54676fe
wip
oscartbeaumont Aug 5, 2025
8ee5955
wip
oscartbeaumont Aug 5, 2025
ce9c960
fix up camera select logic
oscartbeaumont Aug 5, 2025
4ae3a72
Merge branch 'new-recording-flow' of https://github.com/CapSoftware/C…
oscartbeaumont Aug 5, 2025
7d5e81d
wip
oscartbeaumont Aug 5, 2025
12c6de0
wip
oscartbeaumont Aug 5, 2025
fe62e64
bruh
oscartbeaumont Aug 5, 2025
97d6581
wip
oscartbeaumont Aug 5, 2025
db30cea
Merge branch 'new-recording-flow' of https://github.com/CapSoftware/C…
oscartbeaumont Aug 5, 2025
3d41ca4
Merge remote-tracking branch 'origin' into new-recording-flow
oscartbeaumont Aug 6, 2025
76e4f36
remove broken Windows z-index tests
oscartbeaumont Aug 6, 2025
9a3f0d5
Merge remote-tracking branch 'origin' into new-recording-flow
oscartbeaumont Aug 6, 2025
1909fa2
Windows z-index prototype
oscartbeaumont Aug 6, 2025
2394c08
windows focus improvements
oscartbeaumont Aug 6, 2025
de10749
Fixed
oscartbeaumont Aug 6, 2025
3c2fc0e
windows is pain
oscartbeaumont Aug 6, 2025
412632e
overhaul code to be good and platform-agnostic
oscartbeaumont Aug 6, 2025
03c321a
Merge remote-tracking branch 'origin' into new-recording-flow
oscartbeaumont Aug 6, 2025
d0ff618
nit
oscartbeaumont Aug 6, 2025
bd64cc4
fix
oscartbeaumont Aug 6, 2025
c2615f1
merge `Main` and `NewMain` windows
oscartbeaumont Aug 6, 2025
b102184
move new recording flow feature to frontend
oscartbeaumont Aug 6, 2025
1b006be
fix window size on spawn
oscartbeaumont Aug 6, 2025
b33ba33
fix
oscartbeaumont Aug 6, 2025
491a63d
Fix screen focus state on Windows
oscartbeaumont Aug 6, 2025
a8334ec
minor fixes to windows
oscartbeaumont Aug 6, 2025
d4fa65b
don't allow window selection to target a Cap window on Windows
oscartbeaumont Aug 6, 2025
8dc66df
maybe fix Windows window-select implementation
oscartbeaumont Aug 6, 2025
76c925d
`get_topmost_at_cursor` Windows wip
oscartbeaumont Aug 6, 2025
950909c
fix
oscartbeaumont Aug 6, 2025
0fa43fa
bad code but might work
oscartbeaumont Aug 6, 2025
3e9217e
remove debug
oscartbeaumont Aug 6, 2025
6fc59c4
fix clippy
oscartbeaumont Aug 6, 2025
e1dad38
Merge branch 'main' into new-recording-flow
oscartbeaumont Aug 7, 2025
d4b08b4
implement display size API
oscartbeaumont Aug 7, 2025
4692b56
show screen name + resolution + fps
oscartbeaumont Aug 7, 2025
e7375b7
better display name wip
oscartbeaumont Aug 7, 2025
2a48543
using displays localizedName
oscartbeaumont Aug 7, 2025
a98b4f9
fix resolution + app icon wip
oscartbeaumont Aug 7, 2025
57dcb2e
render window icon
oscartbeaumont Aug 7, 2025
0a02151
base64 in Rust + make icon a bit bigger
oscartbeaumont Aug 7, 2025
4a63b2d
allow adjusting the window capture area easily
oscartbeaumont Aug 7, 2025
30b0d52
cleanup target select tokio task
oscartbeaumont Aug 7, 2025
84af3cd
windows wip
oscartbeaumont Aug 7, 2025
9c40172
fix `Escape` being stolen from 3rd-party apps
oscartbeaumont Aug 7, 2025
84df93f
fix text color on windows
oscartbeaumont Aug 7, 2025
2f724ac
overhaul Windows monitor name implementatiin
oscartbeaumont Aug 7, 2025
10b0588
improve overlay contrast
oscartbeaumont Aug 7, 2025
210f921
drop text overrides for now
oscartbeaumont Aug 7, 2025
6a8f0a1
fix experimental toggles from scrolling whole page
oscartbeaumont Aug 7, 2025
9d2f6ca
Fix Windows application icon code
oscartbeaumont Aug 7, 2025
614ce6d
Merge branch 'new-recording-flow' of https://github.com/CapSoftware/C…
oscartbeaumont Aug 7, 2025
1f9cb3f
make new recording flow feature more user-friendly
oscartbeaumont Aug 7, 2025
a190a7f
fixes to new recording flow toggle
oscartbeaumont Aug 7, 2025
02a1733
wip: windows implementation
oscartbeaumont Aug 7, 2025
90293c1
fix up coord scaling logic
oscartbeaumont Aug 7, 2025
e456e51
Windows higher resolution app icon
oscartbeaumont Aug 7, 2025
9b8144c
Merge branch 'new-recording-flow' of https://github.com/CapSoftware/C…
oscartbeaumont Aug 7, 2025
3c33f95
fix double registering the keyboard shortcut
oscartbeaumont Aug 7, 2025
c851ee1
cleanup app icon logic for windows?
oscartbeaumont Aug 7, 2025
32e84a6
code cleanup
oscartbeaumont Aug 7, 2025
5cf82be
windows localized display name
oscartbeaumont Aug 7, 2025
4dd601f
improve windows z-index handling
oscartbeaumont Aug 7, 2025
6d661bf
Delete TODO
oscartbeaumont Aug 7, 2025
47a2c54
remove flag
oscartbeaumont Aug 7, 2025
b28f41d
a bunch more cleanup
oscartbeaumont Aug 7, 2025
b0b16d4
Merge remote-tracking branch 'origin' into new-recording-flow
oscartbeaumont Aug 7, 2025
d3b3339
minor cleanup
oscartbeaumont Aug 7, 2025
8797adf
more cleanup
oscartbeaumont Aug 7, 2025
1cbb43f
more cleanup
oscartbeaumont Aug 7, 2025
f438363
Merge remote-tracking branch 'origin' into new-recording-flow
oscartbeaumont Aug 7, 2025
5176f1e
Make Windows compile again
oscartbeaumont Aug 7, 2025
0fa4058
cargo fmt
oscartbeaumont Aug 7, 2025
19e6e58
break
oscartbeaumont Aug 7, 2025
d231301
fixup navigate
oscartbeaumont Aug 7, 2025
6809916
remove logs
oscartbeaumont Aug 7, 2025
22cb9fc
Merge remote-tracking branch 'origin' into new-recording-flow
oscartbeaumont Aug 7, 2025
0e98adc
fixes
oscartbeaumont Aug 7, 2025
5a05daf
cleanup image handling
oscartbeaumont Aug 7, 2025
c725589
more cleanup of Windows implemementation
oscartbeaumont Aug 7, 2025
1afa479
only display recording flow toggle in dev
Brendonovich Aug 12, 2025
616a055
disable experimental toggle outright
Brendonovich Aug 12, 2025
290f6f5
Merge branch 'main' into new-recording-flow
Brendonovich Aug 12, 2025
e905650
fix imports
Brendonovich Aug 12, 2025
06d711a
hicon_to_png_bytes_high_res
Brendonovich Aug 12, 2025
2f5d09c
remove nspanel from global
Brendonovich Aug 12, 2025
2f4229f
cleanup for merge
Brendonovich Aug 12, 2025
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
44 changes: 36 additions & 8 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@solid-primitives/event-listener": "^2.3.3",
"@solid-primitives/history": "^0.1.5",
"@solid-primitives/memo": "^1.4.2",
"@solid-primitives/mouse": "^2.1.2",
"@solid-primitives/refs": "^1.0.8",
"@solid-primitives/resize-observer": "^2.0.26",
"@solid-primitives/scheduled": "^1.4.3",
Expand Down
2 changes: 2 additions & 0 deletions apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ cap-media = { path = "../../../crates/media" }
cap-flags = { path = "../../../crates/flags" }
cap-recording = { path = "../../../crates/recording" }
cap-export = { path = "../../../crates/export" }
cap-displays = { path = "../../../crates/displays" }

flume.workspace = true
tracing-subscriber = "0.3.19"
tracing-appender = "0.2.3"
Expand Down
34 changes: 27 additions & 7 deletions apps/desktop/src-tauri/src/general_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,38 @@ pub struct GeneralSettingsStore {
pub server_url: String,
#[serde(default)]
pub recording_countdown: Option<u32>,
#[serde(default, alias = "open_editor_after_recording")]
#[deprecated]
_open_editor_after_recording: bool,
#[deprecated = "can be removed when native camera preview is ready"]
#[serde(default)]
// #[deprecated = "can be removed when native camera preview is ready"]
#[serde(
default = "default_enable_native_camera_preview",
skip_serializing_if = "no"
)]
pub enable_native_camera_preview: bool,
#[serde(default)]
pub auto_zoom_on_clicks: bool,
// #[deprecated = "can be removed when new recording flow is the default"]
#[serde(
default = "default_enable_new_recording_flow",
skip_serializing_if = "no"
)]
pub enable_new_recording_flow: bool,
#[serde(default)]
pub post_deletion_behaviour: PostDeletionBehaviour,
}

fn default_enable_native_camera_preview() -> bool {
// TODO:
// cfg!(target_os = "macos")
false
}

fn default_enable_new_recording_flow() -> bool {
cfg!(debug_assertions)
}

fn no(_: &bool) -> bool {
false
}

fn default_server_url() -> String {
std::option_env!("VITE_SERVER_URL")
.unwrap_or("https://cap.so")
Expand Down Expand Up @@ -127,9 +147,9 @@ impl Default for GeneralSettingsStore {
custom_cursor_capture: false,
server_url: default_server_url(),
recording_countdown: Some(3),
_open_editor_after_recording: false,
enable_native_camera_preview: false,
enable_native_camera_preview: default_enable_native_camera_preview(),
auto_zoom_on_clicks: false,
enable_new_recording_flow: default_enable_new_recording_flow(),
post_deletion_behaviour: PostDeletionBehaviour::DoNothing,
}
}
Expand Down
8 changes: 7 additions & 1 deletion apps/desktop/src-tauri/src/hotkeys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ impl HotkeysStore {
}
}

#[derive(Serialize, Type, tauri_specta::Event, Debug, Clone)]
pub struct OnEscapePress;

pub type HotkeysState = Mutex<HotkeysStore>;
pub fn init(app: &AppHandle) {
app.plugin(
Expand All @@ -74,6 +77,10 @@ pub fn init(app: &AppHandle) {
return;
}

if shortcut.key == Code::Escape {
OnEscapePress.emit(app).ok();
}

let state = app.state::<HotkeysState>();
let store = state.lock().unwrap();

Expand All @@ -90,7 +97,6 @@ pub fn init(app: &AppHandle) {
let store = HotkeysStore::get(app).unwrap().unwrap_or_default();

let global_shortcut = app.global_shortcut();

for hotkey in store.hotkeys.values() {
global_shortcut.register(Shortcut::from(*hotkey)).ok();
}
Expand Down
23 changes: 19 additions & 4 deletions apps/desktop/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ mod permissions;
mod platform;
mod presets;
mod recording;
mod target_select_overlay;
mod tray;
mod upload;
mod web_api;
Expand Down Expand Up @@ -69,6 +70,7 @@ use tauri::Window;
use tauri::{AppHandle, Manager, State, WindowEvent};
use tauri_plugin_deep_link::DeepLinkExt;
use tauri_plugin_dialog::DialogExt;
use tauri_plugin_global_shortcut::GlobalShortcutExt;
use tauri_plugin_notification::{NotificationExt, PermissionState};
use tauri_plugin_opener::OpenerExt;
use tauri_plugin_shell::ShellExt;
Expand Down Expand Up @@ -1758,7 +1760,7 @@ async fn get_system_audio_waveforms(
#[tauri::command]
#[specta::specta]
async fn show_window(app: AppHandle, window: ShowCapWindow) -> Result<(), String> {
window.show(&app).await.unwrap();
let _ = window.show(&app).await;
Ok(())
}

Expand Down Expand Up @@ -1951,7 +1953,9 @@ pub async fn run(recording_logging_handle: LoggingHandle) {
captions::download_whisper_model,
captions::check_model_exists,
captions::delete_whisper_model,
captions::export_captions_srt
captions::export_captions_srt,
target_select_overlay::open_target_select_overlays,
target_select_overlay::close_target_select_overlays,
])
.events(tauri_specta::collect_events![
RecordingOptionsChanged,
Expand All @@ -1971,7 +1975,9 @@ pub async fn run(recording_logging_handle: LoggingHandle) {
UploadProgress,
captions::DownloadProgress,
recording::RecordingEvent,
RecordingDeleted
RecordingDeleted,
target_select_overlay::TargetUnderCursor,
hotkeys::OnEscapePress
])
.error_handling(tauri_specta::ErrorHandlingMode::Throw)
.typ::<ProjectConfiguration>()
Expand Down Expand Up @@ -2042,6 +2048,7 @@ pub async fn run(recording_logging_handle: LoggingHandle) {
.with_denylist(&[
CapWindowId::Setup.label().as_str(),
"window-capture-occluder",
"target-select-overlay",
CapWindowId::CaptureArea.label().as_str(),
CapWindowId::Camera.label().as_str(),
CapWindowId::RecordingsOverlay.label().as_str(),
Expand All @@ -2053,6 +2060,7 @@ pub async fn run(recording_logging_handle: LoggingHandle) {
label if label.starts_with("window-capture-occluder-") => {
"window-capture-occluder"
}
label if label.starts_with("target-select-overlay") => "target-select-overlay",
_ => label,
})
.build(),
Expand All @@ -2064,6 +2072,7 @@ pub async fn run(recording_logging_handle: LoggingHandle) {
hotkeys::init(&app);
general_settings::init(&app);
fake_window::init(&app);
app.manage(target_select_overlay::WindowFocusManager::default());
app.manage(EditorWindowIds::default());

if let Ok(Some(auth)) = AuthStore::load(&app) {
Expand Down Expand Up @@ -2197,6 +2206,10 @@ pub async fn run(recording_logging_handle: LoggingHandle) {
}
return;
}
CapWindowId::TargetSelectOverlay { display_id } => {
app.state::<target_select_overlay::WindowFocusManager>()
.destroy(&display_id, app.global_shortcut());
}
_ => {}
};
}
Expand Down Expand Up @@ -2256,7 +2269,9 @@ pub async fn run(recording_logging_handle: LoggingHandle) {
}
} else {
let handle = handle.clone();
tokio::spawn(async move { ShowCapWindow::Main.show(&handle).await });
tokio::spawn(async move {
let _ = ShowCapWindow::Main.show(&handle).await;
});
}
}
tauri::RunEvent::ExitRequested { code, api, .. } => {
Expand Down
Loading
Loading