Repository navigation
feat(sidebar): retain recently completed sessions in running filter #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0fc270f
ef17ef4
b11282d
115b868
234b5aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ import type { AppUpdateInfo } from "./AppUpdateDialog"; | |
| import { useFontSize, type FontSizePreference } from "@/hooks/useFontSize"; | ||
| import { useUiScale, type UiScalePreference } from "@/hooks/useUiScale"; | ||
| import { useTouchTargets, type TouchTargetsPreference } from "@/hooks/useTouchTargets"; | ||
| import { useRecentRunsLimit, type RecentRunsLimitPreset } from "@/hooks/useRecentRunsLimit"; | ||
| import { useSpeechSynthesis } from "@/hooks/useSpeechSynthesis"; | ||
| import { useNotificationPrefs } from "@/hooks/useNotifications"; | ||
| import { NOTIFICATION_TYPES, renderNotification, type NotificationType } from "@/lib/notification-events"; | ||
|
|
@@ -843,6 +844,12 @@ export function SettingsConfig({ activeTab, toolCallsDefaultCollapsed, onToolCal | |
| const { fontSize, setFontSize } = useFontSize(); | ||
| const { uiScale, setUiScale } = useUiScale(); | ||
| const { touchTargets, setTouchTargets } = useTouchTargets(); | ||
| const { | ||
| preset: recentRunsPreset, | ||
| customValue: recentRunsCustomValue, | ||
| setPreset: setRecentRunsPreset, | ||
| setCustomValue: setRecentRunsCustomValue, | ||
| } = useRecentRunsLimit(); | ||
| const { | ||
| isSupported: ttsSupported, | ||
| autoPlayEnabled: ttsAutoPlay, | ||
|
|
@@ -1363,6 +1370,40 @@ export function SettingsConfig({ activeTab, toolCallsDefaultCollapsed, onToolCal | |
| <option value="xl" style={nativeOptionStyle}>{t("settingsConfig.fontSizeXLarge")}</option> | ||
| </select> | ||
| </NativeSetting> | ||
| <NativeSetting searchId="recent-runs-limit" label={t("settingsConfig.recentRunsLimit")} description={t("settingsConfig.recentRunsLimitDesc")} scope="UI"> | ||
| <div style={{ display: "flex", alignItems: "center", gap: 8, flexWrap: "wrap" }}> | ||
| <select | ||
| style={nativeSelectStyle} | ||
| value={recentRunsPreset} | ||
| onChange={(e) => setRecentRunsPreset(e.target.value as RecentRunsLimitPreset)} | ||
| > | ||
|
Comment on lines
+1375
to
+1379
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add accessible names to the
Set Proposed fix
Also applies to: 1386-1391
|
||
| <option value="10" style={nativeOptionStyle}>{t("settingsConfig.recentRunsOption10")}</option> | ||
| <option value="15" style={nativeOptionStyle}>{t("settingsConfig.recentRunsOption15")}</option> | ||
| <option value="20" style={nativeOptionStyle}>{t("settingsConfig.recentRunsOption20")}</option> | ||
| <option value="custom" style={nativeOptionStyle}>{t("settingsConfig.recentRunsOptionCustom")}</option> | ||
| </select> | ||
| {recentRunsPreset === "custom" && ( | ||
| <input | ||
| type="number" | ||
| min={1} | ||
| max={100} | ||
| value={recentRunsCustomValue} | ||
| onChange={(e) => setRecentRunsCustomValue(Number(e.target.value))} | ||
|
Comment on lines
+1390
to
+1391
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The controlled number input cannot be cleared or retyped.
Keep a local draft string in the component. Commit the clamped value on Sketch
|
||
| style={{ | ||
| width: 80, | ||
| height: "var(--control-height)", | ||
| padding: "0 10px", | ||
| border: "1px solid var(--border)", | ||
| borderRadius: "var(--radius-control)", | ||
| background: "var(--bg)", | ||
| color: "var(--text)", | ||
| fontSize: "var(--text-sm)", | ||
| }} | ||
| placeholder={t("settingsConfig.recentRunsCustomPlaceholder")} | ||
| /> | ||
| )} | ||
| </div> | ||
| </NativeSetting> | ||
| <NativeSetting searchId="ui-scale" label={t("settingsConfig.uiScale")} description={t("settingsConfig.uiScaleDesc")} scope="UI"> | ||
| <select | ||
| style={nativeSelectStyle} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Register
recent-runs-limitinSETTING_INDEX.This setting uses
searchId="recent-runs-limit".SETTING_INDEXhas no entry with thatid. The settings search never returns it, and search-result highlight cannot target it. Every other "Interface & Behavior" setting has an index entry.Add an entry to the "Interface & Behavior" block of
SETTING_INDEX, for example afterchat-font-size: