Commit e6cb84e
authored
fix(web): correct task previews and running title (#261)
## Related Issue
Follow-up review of #245; no separate issue.
## Problem
Task output previews can begin inside a multibyte UTF-8 sequence when
the byte limit does not align with a character boundary. The decoded
preview then contains replacement characters and can encode beyond the
requested limit. Persisted previews also read the complete task log on
every poll even though the UI only needs its tail, which can stall the
app when logs are large. The running tab title also uses a Braille
spinner frame even though Braille animation is reserved for the thinking
indicator.
## What changed
- Align live and persisted task-output tails to a valid UTF-8 character
boundary.
- Read only the requested persisted output range instead of loading the
complete log.
- Report the bytes actually returned after boundary alignment.
- Add core and gateway regressions for byte boundaries and large
persisted logs.
- Use a stable dot in the running tab title and rebuild the committed
web bundle.
## Verification
- Agent core v2: 5,859 tests passed.
- Agent gateway: 1,332 tests passed.
- Web: 1,113 tests passed.
- Root lint and typecheck passed.
- `tsgo` passed for agent core v2, agent gateway, and web.
- `pnpm run build:web` and `pnpm run check:web` passed.
- Live browser verified `• Pythinker Code Web` while running and the
normal title while idle.
- GitNexus reported low risk, 11 changed symbols, and no affected
execution flows.
## 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
* **New Features**
* Task output previews now handle UTF-8 text safely, even when truncated
at character boundaries.
* Large task-output logs load more efficiently by reading only the
requested tail.
* Added support for additional diagram types and editor language
features.
* **Bug Fixes**
* Running tasks now show a stable bullet in the page title instead of an
animated spinner character.
* Improved task preview responsiveness and corrected multibyte-character
truncation.
* **Tests**
* Expanded coverage for UTF-8 previews, large-output handling, and task
completion timing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 3655d11 commit e6cb84e
103 files changed
Lines changed: 317 additions & 214 deletions
File tree
- .changeset
- apps
- pythinker-code/dist-web
- assets
- pythinker-web
- src/composables
- test
- packages
- agent-core-v2
- src/agent/task
- test/agent/task
- tools
- agent-gateway/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 | + | |
| 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