Skip to content
TypeScript

fix: multiple UI and server bug fixes (#11593)

Kriday Dave24b711b7f9cc
diff --git a/apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift b/apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift
index 262cc8a8a74..69f8a6d4af1 100644
--- a/apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift
+++ b/apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift
@@ -410,6 +410,7 @@ public final class T3TerminalView: ExpoView, UITextFieldDelegate {
return false
}
+ emitInput("\u{7F}")
return false
}
diff --git a/apps/server/src/sourceControl/ForgejoCli.ts b/apps/server/src/sourceControl/ForgejoCli.ts
index 9fdb4149c8b..0eacba0759c 100644
--- a/apps/server/src/sourceControl/ForgejoCli.ts
+++ b/apps/server/src/sourceControl/ForgejoCli.ts
@@ -366,25 +366,6 @@ export const make = Effect.gen(function* () {
.execute(request)
.pipe(Effect.provideService(FetchHttpClient.RequestInit, { redirect: "manual" }));
const status = response.status;
- if (status < 200 || status >= 300)
- return yield* new ForgejoCliError({
- command: "fj",
- cwd: input.cwd,
- httpStatus: status,
- ...(status === 401
- ? { reason: "authentication" as const }
- : status === 403
- ? { reason: "forbidden" as const }
- : status === 404
- ? { reason: "not-found" as const }
- : status === 429
- ? { reason: "rate-limit" as const }
- : {}),
- detail:
- status === 404
- ? "Forgejo repository or pull request was not found."
- : `Forgejo API request failed (HTTP ${status}). Check this server's fj credentials and permissions.`,
- });
const body =
status === 204 || status === 205
? { text: "", truncated: false, invalidUtf8: false }
@@ -399,6 +380,29 @@ export const make = Effect.gen(function* () {
reason: "invalid-response",
detail: "Forgejo returned an oversized or invalid response.",
});
+ if (status < 200 || status >= 300) {
+ const detail =
+ status === 404
+ ? "Forgejo repository or pull request was not found."
+ : body.text
+ ? `Forgejo API request failed (HTTP ${status}): ${body.text}`
+ : `Forgejo API request failed (HTTP ${status}). Check this server's fj credentials and permissions.`;
+ return yield* new ForgejoCliError({
+ command: "fj",
+ cwd: input.cwd,
+ httpStatus: status,
+ ...(status === 401
+ ? { reason: "authentication" as const }
+ : status === 403
+ ? { reason: "forbidden" as const }
+ : status === 404
+ ? { reason: "not-found" as const }
+ : status === 429
+ ? { reason: "rate-limit" as const }
+ : {}),
+ detail,
+ });
+ }
return {
exitCode: ChildProcessSpawner.ExitCode(0),
stdout: body.text,
diff --git a/apps/web/src/components/chat/ModelPickerSidebar.tsx b/apps/web/src/components/chat/ModelPickerSidebar.tsx
index 30f9e3ce809..19a542d2aa2 100644
--- a/apps/web/src/components/chat/ModelPickerSidebar.tsx
+++ b/apps/web/src/components/chat/ModelPickerSidebar.tsx
@@ -203,7 +203,7 @@ export const ModelPickerSidebar = memo(function ModelPickerSidebar(props: {
displayName={entry.displayName}
accentColor={entry.accentColor}
showBadge={showInstanceBadge}
- className="size-6"
+ className="size-6 z-30"
iconClassName="size-5"
indicatorBackground={
isHovered && !isDisabled
diff --git a/apps/web/src/components/chat/ProviderInstanceIcon.tsx b/apps/web/src/components/chat/ProviderInstanceIcon.tsx
index 4a40ed15bcb..b9f7853cd8e 100644
--- a/apps/web/src/components/chat/ProviderInstanceIcon.tsx
+++ b/apps/web/src/components/chat/ProviderInstanceIcon.tsx
@@ -29,7 +29,7 @@ export const ProviderInstanceIcon = memo(function ProviderInstanceIcon(props: {
return (
<span
className={cn(
- "relative isolate inline-flex shrink-0 items-center justify-center overflow-visible",
+ "relative isolate z-30 inline-flex shrink-0 items-center justify-center overflow-visible",
props.className,
)}
style={accentStyle}
diff --git a/apps/web/src/components/chat/ProviderModelPicker.tsx b/apps/web/src/components/chat/ProviderModelPicker.tsx
index bc8e7b48ce9..05e8d2217ff 100644
--- a/apps/web/src/components/chat/ProviderModelPicker.tsx
+++ b/apps/web/src/components/chat/ProviderModelPicker.tsx
@@ -25,6 +25,7 @@ import {
type ComposerControlSize,
} from "./ComposerControl";
import { useComposerMenuProps } from "./composerEventScope";
+import { shortcutLabelForCommand } from "../../keybindings";
export const ProviderModelPicker = memo(function ProviderModelPicker(props: {
/**
@@ -154,6 +155,13 @@ export const ProviderModelPicker = memo(function ProviderModelPicker(props: {
setIsMenuOpen(false);
};
+ const shortcutLabel = props.keybindings
+ ? shortcutLabelForCommand(props.keybindings, "modelPicker.toggle")
+ : null;
+ const triggerTooltipContent = shortcutLabel
+ ? `${props.triggerLabel ?? triggerLabel} · ${shortcutLabel}`
+ : (props.triggerLabel ?? triggerLabel);
+
return (
<Popover
open={isMenuOpen}
@@ -210,7 +218,7 @@ export const ProviderModelPicker = memo(function ProviderModelPicker(props: {
>
{props.triggerLabel ?? triggerTitle}
</TooltipTrigger>
- <TooltipPopup side="top">{props.triggerLabel ?? triggerLabel}</TooltipPopup>
+ <TooltipPopup side="top">{triggerTooltipContent}</TooltipPopup>
</Tooltip>
{selectedModel?.isUnavailable && props.triggerLabel === undefined ? (
<Badge variant="outline" size="sm">
diff --git a/apps/web/src/components/ui/dialog-styles.ts b/apps/web/src/components/ui/dialog-styles.ts
index 4dda3fe9392..f2eeae928e9 100644
--- a/apps/web/src/components/ui/dialog-styles.ts
+++ b/apps/web/src/components/ui/dialog-styles.ts
@@ -5,7 +5,7 @@ const DIALOG_BACKDROP_CLASS = `dialog-backdrop ${DIALOG_BACKDROP_BASE_CLASS}`;
const DIALOG_MEDIA_BACKDROP_CLASS = `${DIALOG_BACKDROP_BASE_CLASS} bg-black/75 backdrop-blur-none`;
const DIALOG_POPUP_BASE_CLASS =
- "-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative flex min-h-0 w-full min-w-0 scale-[calc(1-0.1*var(--nested-dialogs))] flex-col opacity-[calc(1-0.1*var(--nested-dialogs))] outline-none transition-[scale,opacity,translate] duration-200 ease-in-out will-change-transform data-nested:data-ending-style:translate-y-8 data-nested:data-starting-style:translate-y-8 data-nested-dialog-open:origin-top data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0";
+ "-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative flex min-h-0 w-full min-w-0 scale-[calc(1-0.1*var(--nested-dialogs))] flex-col opacity-[calc(1-0.1*var(--nested-dialogs))] outline-none transition-[scale,opacity,translate] duration-200 ease-in-out will-change-transform data-nested:data-ending-style:translate-y-8 data-nested:data-starting-style:translate-y-8 data-nested-dialog-open:origin-top data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 [-webkit-app-region:no-drag]";
const DIALOG_POPUP_CLASS = `dialog-glass ${DIALOG_POPUP_BASE_CLASS} rounded-2xl border`;
const DIALOG_MEDIA_POPUP_CLASS = `${DIALOG_POPUP_BASE_CLASS} max-h-[92vh] w-auto max-w-[92vw] overflow-visible rounded-none border border-transparent bg-transparent p-0 shadow-none`;