Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 6
fix: land the missing desktop changesets and repair dark-mode desktop UI#92
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
fa00ec3525fc2765a4f6c3670f27774aca73cdf7b3a2964e2File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@pymodel/pythinker-code": patch | ||
| "@pymodel/pythinker-desktop": patch | ||
| --- | ||
| Make the workspace header, session timestamps, and the settings row legible in dark mode on the translucent desktop sidebar. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@pymodel/pythinker-desktop": patch | ||
| --- | ||
| Publish desktop releases to a dedicated update channel so update checks resolve a desktop build instead of an unrelated release, and fail the release when a packaged build carries no update feed. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@pymodel/pythinker-desktop": patch | ||
| --- | ||
| Pin the Host port so the desktop app reconnects to its own Host, and stop reporting builds that cannot self-update as update errors. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -8,36 +8,48 @@ const desktopRoot = resolve(import.meta.dirname, '..') | ||
| const mainSource = readFileSync(resolve(desktopRoot, 'src', 'main.ts'), 'utf8') | ||
| describe('desktop window appearance configuration', () => { | ||
| it('keeps Windows opaque and non-Windows windows transparent', () => { | ||
| it('keeps the main window opaque on every platform', () => { | ||
| const backgroundMaterialMatches = [...mainSource.matchAll(/backgroundMaterial/gu)] | ||
| const win32BranchMatches = [...mainSource.matchAll( | ||
| /\.\.\.\(process\.platform === 'win32' \? \{([\s\S]*?)\} : \{\s*transparent: true,/gu, | ||
| )] | ||
| const nonWin32BranchMatches = [...mainSource.matchAll( | ||
| /\} : \{\s*transparent: true,[\s\S]*?\}\),\s*title:/gu, | ||
| const mainWindowOptionMatches = [...mainSource.matchAll( | ||
| /const window = new BrowserWindow\(\{([\s\S]*?)\n \}\)/gu, | ||
| )] | ||
| expect(backgroundMaterialMatches).toHaveLength(0) | ||
| expect(win32BranchMatches).toHaveLength(1) | ||
| expect(nonWin32BranchMatches).toHaveLength(1) | ||
| expect(mainWindowOptionMatches).toHaveLength(1) | ||
| const win32Branch = win32BranchMatches[0]![1]! | ||
| const opaqueColorMatches = [...win32Branch.matchAll(/backgroundColor:\s*'#[0-9a-fA-F]{6}'/gu)] | ||
| const alphaColorMatches = [...win32Branch.matchAll(/#[0-9a-fA-F]{8}/gu)] | ||
| const hasShadowMatches = [...win32Branch.matchAll(/hasShadow:\s*true/gu)] | ||
| const roundedCornersMatches = [...win32Branch.matchAll(/roundedCorners:\s*true/gu)] | ||
| const thickFrameMatches = [...win32Branch.matchAll(/thickFrame:\s*true/gu)] | ||
| const mainWindowOptions = mainWindowOptionMatches[0]![1]! | ||
| const vibrancyMatches = [...mainWindowOptions.matchAll(/vibrancy\s*:/gu)] | ||
| const visualEffectStateMatches = [...mainWindowOptions.matchAll(/visualEffectState\s*:/gu)] | ||
| const transparentMatches = [...mainWindowOptions.matchAll(/transparent:\s*true/gu)] | ||
| const backgroundColorMatches = [...mainWindowOptions.matchAll( | ||
| /backgroundColor:\s*'(#[0-9a-fA-F]{6}(?:[0-9a-fA-F]{2})?)'/gu, | ||
| )] | ||
| const transparentBackgroundMatches = backgroundColorMatches.filter( | ||
| (match) => match[1]!.length === 9 && match[1]!.endsWith('00'), | ||
| ) | ||
| const hasShadowMatches = [...mainWindowOptions.matchAll( | ||
| /hasShadow:\s*process\.platform === 'win32' \? true : undefined/gu, | ||
| )] | ||
| const roundedCornersMatches = [...mainWindowOptions.matchAll( | ||
| /roundedCorners:\s*process\.platform === 'win32' \? true : undefined/gu, | ||
| )] | ||
| const thickFrameMatches = [...mainWindowOptions.matchAll( | ||
| /thickFrame:\s*process\.platform === 'win32' \? true : undefined/gu, | ||
| )] | ||
| expect(opaqueColorMatches).toHaveLength(1) | ||
| expect(alphaColorMatches).toHaveLength(0) | ||
| expect(vibrancyMatches).toHaveLength(0) | ||
| expect(visualEffectStateMatches).toHaveLength(0) | ||
| expect(transparentMatches).toHaveLength(0) | ||
coderabbitai[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| expect(backgroundColorMatches).toHaveLength(1) | ||
| expect(backgroundColorMatches[0]![1]).not.toBe('#00000000') | ||
| expect(transparentBackgroundMatches).toHaveLength(0) | ||
| expect(hasShadowMatches).toHaveLength(1) | ||
| expect(roundedCornersMatches).toHaveLength(1) | ||
| expect(thickFrameMatches).toHaveLength(1) | ||
| expect(win32Branch).toContain('backgroundColor') | ||
| expect(nonWin32BranchMatches[0]![0]).toContain('transparent: true') | ||
| expect(win32Branch).toContain('hasShadow') | ||
| expect(win32Branch).toContain('roundedCorners') | ||
| expect(win32Branch).toContain('thickFrame') | ||
| expect(mainWindowOptions).toContain('backgroundColor') | ||
| expect(mainWindowOptions).toContain('hasShadow') | ||
| expect(mainWindowOptions).toContain('roundedCorners') | ||
| expect(mainWindowOptions).toContain('thickFrame') | ||
| }) | ||
| }) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -735,12 +735,18 @@ const hasUpload = computed(() => !!props.uploadImage); | ||
| // --------------------------------------------------------------------------- | ||
| const dropdownOpen = ref(false); | ||
| const modelPillRef = ref<HTMLElement | null>(null); | ||
| const modelDropdownStyle = ref<Record<string, string>>({}); | ||
| const permDropdownOpen = ref(false); | ||
| const toolbarRef = ref<HTMLElement | null>(null); | ||
| function toggleDropdown(): void { | ||
| dropdownOpen.value = !dropdownOpen.value; | ||
| if (dropdownOpen.value) { | ||
| const rect = modelPillRef.value?.getBoundingClientRect(); | ||
| modelDropdownStyle.value = rect | ||
| ? { maxHeight: `${Math.max(160, rect.top - 4 - 12)}px` } | ||
| : {}; | ||
coderabbitai[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| permDropdownOpen.value = false; | ||
| document.addEventListener('click', onDocClick, true); | ||
| } else { | ||
| @@ -1179,6 +1185,7 @@ function selectModel(modelId: string): void { | ||
| <!-- Model pill — click to open quick-switch dropdown --> | ||
| <span | ||
| v-if="status" | ||
| ref="modelPillRef" | ||
| class="model-pill" | ||
| :class="{ open: dropdownOpen }" | ||
| role="button" | ||
| @@ -1195,7 +1202,7 @@ function selectModel(modelId: string): void { | ||
| </div> | ||
| <!-- Model dropdown — current provider models + controls + more --> | ||
| <div v-if="dropdownOpen && status" class="model-dropdown" role="menu" @click.stop> | ||
| <div v-if="dropdownOpen && status" class="model-dropdown" :style="modelDropdownStyle" role="menu" @click.stop> | ||
| <!-- Starred models from other providers --> | ||
| <div v-if="starredOtherModels.length > 0" class="md-section">{{ t('status.starredModels') }}</div> | ||
| <button | ||
| @@ -1719,6 +1726,7 @@ function selectModel(modelId: string): void { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 1px; | ||
| overflow-y: auto; | ||
| } | ||
| .md-section { | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.