Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
build-tool: cross
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
build-tool: cross
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
build-tool: cross
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Comment thread
cursor[bot] marked this conversation as resolved.
- target: x86_64-pc-windows-msvc
os: windows-latest
build-tool: cargo
Expand Down
13 changes: 13 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@ pre-build = [
"apt-get update",
"apt-get install -y libudev-dev:$CROSS_DEB_ARCH",
]

[target.x86_64-unknown-linux-musl]
pre-build = [
"apt-get update",
"apt-get install -y libudev-dev",
]
Comment thread
greptile-apps[bot] marked this conversation as resolved.

[target.aarch64-unknown-linux-musl]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update",
"apt-get install -y libudev-dev:$CROSS_DEB_ARCH",
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glibc libudev-dev incompatible with musl cross-compilation targets

High Severity

The musl target sections install libudev-dev via apt-get, which provides glibc-linked libraries and objects. The hidapi crate (depended on by ctap-hid-fido2) requires libudev via pkg-config for its default linux-static-hidraw backend. When the musl linker attempts to link against glibc's libudev, it will fail due to ABI incompatibility. This configuration was copy-pasted from the glibc targets but is not valid for musl — musl targets need either a musl-compiled libudev (e.g., from Alpine's eudev-dev) or a different hidapi backend like linux-static-libusb.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c1f004a. Configure here.

55 changes: 22 additions & 33 deletions src/tui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,12 +463,11 @@ impl App {
self.popup = Popup::ConfirmDelete(key.clone());
}
}
KeyCode::Char('e') => {
KeyCode::Char('e')
// Edit selected secret value
if self.focus == Focus::Secrets {
if self.focus == Focus::Secrets => {
self.open_edit_secret();
}
}
KeyCode::Char('s') => {
// Set/create a new secret
self.popup = Popup::SetSecret(SetState {
Expand Down Expand Up @@ -636,16 +635,12 @@ impl App {
self.resolved_values.insert(key.clone(), Some(value));
self.status_message = Some(format!("Updated {} (in memory only)", key));
}
KeyCode::Backspace => {
if state.cursor > 0 {
Self::remove_char_at(&mut state.value, state.cursor - 1);
state.cursor -= 1;
}
KeyCode::Backspace if state.cursor > 0 => {
Self::remove_char_at(&mut state.value, state.cursor - 1);
state.cursor -= 1;
}
KeyCode::Delete => {
if state.cursor < state.value.chars().count() {
Self::remove_char_at(&mut state.value, state.cursor);
}
KeyCode::Delete if state.cursor < state.value.chars().count() => {
Self::remove_char_at(&mut state.value, state.cursor);
}
KeyCode::Left => {
state.cursor = state.cursor.saturating_sub(1);
Expand Down Expand Up @@ -714,15 +709,13 @@ impl App {
self.resolved_values.insert(key.clone(), Some(value));
self.status_message = Some(format!("Set {} (in memory only)", key));
}
KeyCode::Backspace => {
if state.cursor > 0 {
let field = match state.field {
SetField::Key => &mut state.key,
SetField::Value => &mut state.value,
};
Self::remove_char_at(field, state.cursor - 1);
state.cursor -= 1;
}
KeyCode::Backspace if state.cursor > 0 => {
let field = match state.field {
SetField::Key => &mut state.key,
SetField::Value => &mut state.value,
};
Self::remove_char_at(field, state.cursor - 1);
state.cursor -= 1;
}
KeyCode::Delete => {
let field = match state.field {
Expand Down Expand Up @@ -768,19 +761,15 @@ impl App {
}
self.popup = Popup::None;
}
KeyCode::Down | KeyCode::Char('j') => {
if !self.available_profiles.is_empty() {
self.profile_picker_index =
(self.profile_picker_index + 1) % self.available_profiles.len();
}
KeyCode::Down | KeyCode::Char('j') if !self.available_profiles.is_empty() => {
self.profile_picker_index =
(self.profile_picker_index + 1) % self.available_profiles.len();
}
KeyCode::Up | KeyCode::Char('k') => {
if !self.available_profiles.is_empty() {
self.profile_picker_index = self
.profile_picker_index
.checked_sub(1)
.unwrap_or(self.available_profiles.len() - 1);
}
KeyCode::Up | KeyCode::Char('k') if !self.available_profiles.is_empty() => {
self.profile_picker_index = self
.profile_picker_index
.checked_sub(1)
.unwrap_or(self.available_profiles.len() - 1);
}
_ => {}
}
Expand Down
15 changes: 6 additions & 9 deletions src/tui/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,19 @@ impl EventHandler {
if event::poll(tick_rate).unwrap_or(false) {
if let Ok(evt) = event::read() {
match evt {
CrosstermEvent::Key(key) => {
if tx_clone.send(Event::Key(key)).is_err() {
CrosstermEvent::Key(key)
if tx_clone.send(Event::Key(key)).is_err() => {
break;
}
}
CrosstermEvent::Mouse(mouse) => {
if tx_clone.send(Event::Mouse(mouse)).is_err() {
CrosstermEvent::Mouse(mouse)
if tx_clone.send(Event::Mouse(mouse)).is_err() => {
break;
}
}
CrosstermEvent::Resize(_, _) => {
CrosstermEvent::Resize(_, _)
// Terminal resize - send tick to trigger redraw
if tx_clone.send(Event::Tick).is_err() {
if tx_clone.send(Event::Tick).is_err() => {
break;
}
}
_ => {}
}
}
Expand Down
Loading