Add Windows Electron desktop support (#1093)
* fix: make upstream sync actions target the selected remote Ensure fetch and pull actually honor upstream selection so fork maintenance works from the Git sidebar, and surface upstream branch status alongside the primary origin-tracking indicators. * feat: add Windows Electron desktop foundation * fix(electron): stabilize Windows desktop packaging * fix(electron): stabilize Windows desktop chrome Use native Windows titlebar behavior with an Alt-accessible hidden menu, and harden Windows dev command launching so the desktop app follows platform conventions. * fix(electron): stabilize Windows dev startup * fix(electron): clarify desktop artifact names * fix(electron): harden Windows desktop release and launch * fix(electron): address Windows release review * fix(electron): point updater and release links to org repo * Fix Windows settings persistence fallback * Fix Windows Electron dev startup * Add Windows Electron window controls * Fix Windows Electron install and opencode launch * fix: resolve git status for repositories without upstream Fixes repository detection stuck on Checking repository Handles git status when no upstream is configured Adds regression coverage for git status loading * Add Windows app menu button * fix: preserve file editor line endings * ci: add desktop release smoke workflow --------- Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
Bohdan Triapitsyn
parent
cc7969ac00
commit
becd240168
@@ -204,6 +204,21 @@ const haveDiffStatsChanged = (
|
||||
return false;
|
||||
};
|
||||
|
||||
const haveRemoteComparisonChanged = (
|
||||
previous?: GitStatus['upstreamComparison'],
|
||||
next?: GitStatus['upstreamComparison']
|
||||
): boolean => {
|
||||
if (!previous && !next) return false;
|
||||
if (!previous || !next) return true;
|
||||
|
||||
return (
|
||||
previous.remote !== next.remote
|
||||
|| previous.branch !== next.branch
|
||||
|| previous.ahead !== next.ahead
|
||||
|| previous.behind !== next.behind
|
||||
);
|
||||
};
|
||||
|
||||
const hasStatusChanged = (oldStatus: GitStatus | null, newStatus: GitStatus | null): boolean => {
|
||||
if (!oldStatus && !newStatus) return false;
|
||||
if (!oldStatus || !newStatus) return true;
|
||||
@@ -217,6 +232,12 @@ const hasStatusChanged = (oldStatus: GitStatus | null, newStatus: GitStatus | nu
|
||||
if (oldStatus.current !== newStatus.current) return true;
|
||||
if (oldStatus.tracking !== newStatus.tracking) return true;
|
||||
if (oldStatus.isClean !== newStatus.isClean) return true;
|
||||
if (
|
||||
newStatus.upstreamComparison !== undefined
|
||||
&& haveRemoteComparisonChanged(oldStatus.upstreamComparison, newStatus.upstreamComparison)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const oldPaths = new Set(oldFiles.map(f => `${f.path}:${f.index}:${f.working_dir}`));
|
||||
for (const file of newFiles) {
|
||||
@@ -465,9 +486,17 @@ export const useGitStore = create<GitStore>()(
|
||||
}
|
||||
|
||||
// Preserve diffStats from previous status when light mode returns none
|
||||
const mergedStatus = newStatus.diffStats === undefined && currentDirState.status?.diffStats
|
||||
? { ...newStatus, diffStats: currentDirState.status.diffStats }
|
||||
: newStatus;
|
||||
const mergedStatus = {
|
||||
...newStatus,
|
||||
diffStats:
|
||||
newStatus.diffStats === undefined && currentDirState.status?.diffStats !== undefined
|
||||
? currentDirState.status.diffStats
|
||||
: newStatus.diffStats,
|
||||
upstreamComparison:
|
||||
newStatus.upstreamComparison === undefined
|
||||
? currentDirState.status?.upstreamComparison
|
||||
: newStatus.upstreamComparison,
|
||||
};
|
||||
|
||||
newDirectories.set(directory, {
|
||||
...currentDirState,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
import { fetchDesktopInstalledApps, isDesktopLocalOriginActive, isTauriShell, type DesktopSettings, type InstalledDesktopAppInfo } from '@/lib/desktop';
|
||||
import { OPEN_IN_APPS, DEFAULT_OPEN_IN_APP_ID, OPEN_IN_ALWAYS_AVAILABLE_APP_IDS, getOpenInAppById, type OpenInApp } from '@/lib/openInApps';
|
||||
import { OPEN_IN_APPS, DEFAULT_OPEN_IN_APP_ID, OPEN_IN_ALWAYS_AVAILABLE_APP_IDS, getOpenInAppById, getPlatformOpenInApp, type OpenInApp } from '@/lib/openInApps';
|
||||
import { updateDesktopSettings } from '@/lib/persistence';
|
||||
|
||||
export type OpenInAppOption = OpenInApp & {
|
||||
@@ -22,7 +22,7 @@ type OpenInAppsState = {
|
||||
const getAlwaysAvailableApps = (): OpenInAppOption[] => {
|
||||
return OPEN_IN_APPS
|
||||
.filter((app) => OPEN_IN_ALWAYS_AVAILABLE_APP_IDS.has(app.id))
|
||||
.map((app) => ({ ...app }));
|
||||
.map((app) => ({ ...getPlatformOpenInApp(app) }));
|
||||
};
|
||||
|
||||
const getStoredAppId = (): string => {
|
||||
@@ -78,7 +78,7 @@ export const useOpenInAppsStore = create<OpenInAppsState>()((set, get) => ({
|
||||
);
|
||||
|
||||
const withIcons = filtered.map((app) => ({
|
||||
...app,
|
||||
...getPlatformOpenInApp(app),
|
||||
iconDataUrl: iconMap.get(app.appName),
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user