Skip to content

Commit afd313c

Browse files
authored
fix: refine desktop sidebar and prompt anchor (#212)
## Related Issue Related to #210 ## Problem The desktop sidebar uses a full update card, the prompt anchor can stay expanded after navigation, and fixed macOS header spacing can overlap native window controls. The sidebar also carries obsolete banner assets. ## What changed - Replaced the sidebar update card with the supplied green update button between the banner and collapse control - Added hover and keyboard-focus release notes while keeping the existing update dialog for download and restart controls - Redesigned the prompt anchor as compact lines with synchronized hover previews, exact prompt navigation, and immediate collapse after selection or pointer exit - Derived collapsed macOS header spacing from Electron's native title-bar safe area - Updated sidebar banner assets, user documentation, changesets, tests, and the committed web bundle ## Verification - `pnpm --filter @pymodel/pythinker-web exec vitest run` — 1,002 tests passed - `pnpm exec vitest run apps/desktop/tests/window-appearance.spec.ts` — 4 tests passed - `pnpm lint` — 0 errors - `pnpm typecheck` - `npm run build` in `docs/` - `node apps/pythinker-code/scripts/check-web-assets.mjs` - Electron development build reviewed with available-update and prompt-anchor states ## Checklist - [x] I have read the [CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md) document. - [x] I have linked a related issue (external PRs: the issue must have a maintainer's `/approve`). - [x] I have added tests that prove my feature works. - [x] Ran `gen-changesets` skill, or this PR needs no changeset. - [x] Ran `gen-docs` skill, or this PR needs no doc update. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Conversation navigation now shows compact prompt markers with hover or focus previews of prompts and responses. * Available desktop updates appear as a sidebar button with release notes and update controls. * macOS desktop window controls and sidebar spacing adapt more accurately to the title bar. * **Bug Fixes** * Improved update-button accessibility, positioning, and release-notes behavior. * Added support for additional Python syntax keywords. * **Documentation** * Updated desktop update guidance to reflect the new sidebar experience. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent e4ed37f commit afd313c

112 files changed

Lines changed: 1110 additions & 688 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/compact-prompt-anchor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@pymodel/pythinker-code": patch
33
---
44

5-
Make the chat prompt anchor a compact line index that expands to prompt labels.
5+
Make the chat prompt anchor a compact line index that opens prompt and response previews.

.changeset/show-desktop-update-card.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@pymodel/pythinker-code": patch
33
---
44

5-
Show available desktop updates in a sidebar card with compact download progress.
5+
Show available desktop updates as a sidebar button with release notes and update controls.

apps/desktop/src/window-options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export function windowAppearanceOptions(platform: NodeJS.Platform): BrowserWindo
55
return {
66
autoHideMenuBar: true,
77
titleBarStyle: 'hiddenInset',
8+
titleBarOverlay: true,
89
trafficLightPosition: { x: 16, y: 16 },
910
// A transparent NSWindow is non-opaque with a clear background, which
1011
// removes native corners and shadow. Vibrancy does not require it.

apps/desktop/tests/window-appearance.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ describe('desktop window appearance configuration', () => {
1111

1212
expect('frame' in opts).toBe(false)
1313
expect(opts['titleBarStyle']).toBe('hiddenInset')
14+
expect(opts['titleBarOverlay']).toBe(true)
1415
expect(opts['trafficLightPosition']).toEqual({ x: 16, y: 16 })
1516
// Native corners and shadow require an opaque window.
1617
expect('transparent' in opts).toBe(false)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"sourceHash": "f88e4160eddd99fef98d31820eb0a5e660fc8209a97edb99e62b445d7f9b7365",
3-
"sourceFileCount": 403
2+
"sourceHash": "ad0be8811299a96afcfa243941b6812309cf4597345759fac292edbcf7dea1e4",
3+
"sourceFileCount": 404
44
}

apps/pythinker-code/dist-web/assets/CodeBlockNode-DnsxSWob.js renamed to apps/pythinker-code/dist-web/assets/CodeBlockNode-C7tgevOd.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/DesignSystemView-DpGFNOXe.js renamed to apps/pythinker-code/dist-web/assets/DesignSystemView-D7qbe5PI.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/Tooltip-By4TAfdP.js renamed to apps/pythinker-code/dist-web/assets/Tooltip-DlGXfx2I.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-EEgTRrll.js renamed to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DGcX3vmh.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)