Commit 974da73
authored
fix(web): pin preview header close button to the top-right corner (#232)
## Related Issue
None — reported directly from the web UI.
## Problem
In the file preview panel the Close (×) button sat inside the same
wrapping action row as search / copy-path / edit / open / reveal / copy.
When the panel got narrow the row wrapped and the × landed mid-row on
the second line; when it got wide the × drifted with the actions instead
of staying in the corner. The download icon in that row also had no use
in the preview (the file is already local to the workspace).
## What changed
- `PanelHeader.vue`: title, subtitle and slot content now live in a
`__main` region. In `wrap` mode only that region wraps; the Close button
is a sibling with `margin-left: auto`, so it stays pinned top-right at
every panel width and however many rows the content needs. Non-wrap
consumers keep identical layout (inner flex with the same gap, Close
still at the far right). `EditorPanel` (the other `wrap` consumer) gets
the same fix for free.
- `FilePreview.vue`: dropped the download link from the header. The
`downloadUrl` prop is kept because it still feeds the PDF viewer `src`.
- Removed the now-unused `filePreview.download` locale key.
- Test: `agent-detail-panel.test.ts` asserts Close is outside `__main`
and that `flex-wrap` lives on `__main`, not on the header itself.
- Restaged `apps/pythinker-code/dist-web` (`pnpm run build:web`).
Verified: `pnpm --filter @pymodel/pythinker-web typecheck`, web vitest
suite (1013 tests), oxlint, `check-web-assets.mjs`.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [ ] 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
* **Bug Fixes**
* Improved file preview headers: the close button stays visible and
properly aligned when content wraps.
* Removed the unused file download action.
* Prevented long task titles and status indicators from overlapping;
content now truncates cleanly while timestamps remain readable.
* **Improvements**
* Updated web assets to support the latest editor and diagram rendering
capabilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 26cd4ac commit 974da73
101 files changed
Lines changed: 203 additions & 157 deletions
File tree
- .changeset
- apps
- pythinker-code/dist-web
- assets
- pythinker-web
- src
- components
- chat
- ui
- i18n/locales/en
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments