Skip to content
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Install hermit (manages node, rust, just)
- uses: cashapp/activate-hermit@v1

# Cache Cargo dependencies
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri

# Install system dependencies for Tauri (Linux)
- name: Install Tauri dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf

# Install dependencies
- name: Install dependencies
run: just install

# Run all checks
- name: Check all (fmt, lint, typecheck)
run: just check-all
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/corepack
4 changes: 2 additions & 2 deletions bin/hermit
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ -z "${HERMIT_STATE_DIR}" ]; then
esac
fi

export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://d1abdrezunyhdp.cloudfront.net/square}"
export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://github.com/cashapp/hermit/releases/download/stable}"
HERMIT_CHANNEL="$(basename "${HERMIT_DIST_URL}")"
export HERMIT_CHANNEL
export HERMIT_EXE=${HERMIT_EXE:-${HERMIT_STATE_DIR}/pkg/hermit@${HERMIT_CHANNEL}/hermit}
Expand All @@ -26,7 +26,7 @@ if [ ! -x "${HERMIT_EXE}" ]; then
echo "Bootstrapping ${HERMIT_EXE} from ${HERMIT_DIST_URL}" 1>&2
INSTALL_SCRIPT="$(mktemp)"
# This value must match that of the install script
INSTALL_SCRIPT_SHA256="4b006236f2e5e81939229b377bb355e3608f94d73ff8feccbd5792d1ed5699cd"
INSTALL_SCRIPT_SHA256="09ed936378857886fd4a7a4878c0f0c7e3d839883f39ca8b4f2f242e3126e1c6"
if [ "${INSTALL_SCRIPT_SHA256}" = "BYPASS" ]; then
curl -fsSL "${HERMIT_DIST_URL}/install.sh" -o "${INSTALL_SCRIPT}"
else
Expand Down
2 changes: 1 addition & 1 deletion bin/node
2 changes: 1 addition & 1 deletion bin/npm
2 changes: 1 addition & 1 deletion bin/npx
1 change: 1 addition & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ check-all: fmt-check lint typecheck

# Install dependencies
install:
rustup default stable
npm install
cd src-tauri && cargo fetch

Expand Down
311 changes: 56 additions & 255 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src-tauri/src/git/refs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ pub fn detect_default_branch(repo: &Path) -> Result<String, GitError> {
let refs = list_refs(repo)?;

// Check for remote-tracking branches first (preferred for merge-base)
let remote_candidates = ["origin/main", "origin/master", "origin/develop", "origin/trunk"];
let remote_candidates = [
"origin/main",
"origin/master",
"origin/develop",
"origin/trunk",
];
for candidate in remote_candidates {
if refs.iter().any(|r| r == candidate) {
return Ok(candidate.to_string());
Expand Down
3 changes: 1 addition & 2 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ fn make_diff_id(repo: &Path, spec: &DiffSpec) -> Result<DiffId, String> {
GitRef::Rev(rev) => git::resolve_ref(repo, rev).map_err(|e| e.to_string()),
GitRef::MergeBase => {
// Resolve merge-base to a concrete SHA for stable storage key
let default_branch =
git::detect_default_branch(repo).map_err(|e| e.to_string())?;
let default_branch = git::detect_default_branch(repo).map_err(|e| e.to_string())?;
git::merge_base(repo, &default_branch, "HEAD").map_err(|e| e.to_string())
}
}
Expand Down
1 change: 0 additions & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
selectPreset,
selectCustomDiff,
resetDiffSelection,

type DiffPreset,
} from './lib/stores/diffSelection.svelte';
import {
Expand Down
2 changes: 0 additions & 2 deletions src/lib/stores/diffSelection.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ export function getPresets(): readonly DiffPreset[] {
return presetStore.presets;
}



/**
* Diff selection state object.
* Use this directly in components - it's reactive!
Expand Down
Loading