Fix OpenCode TUI scroll regression

Revert the May 23 terminal perf restore path and cap retained newline-free TUI redraw output while keeping completed-line terminal read pagination.
This commit is contained in:
Neil
2026-05-23 17:16:35 -07:00
committed by GitHub
parent 3233a41215
commit 82a461c66e
32 changed files with 258 additions and 1632 deletions
+7 -25
View File
@@ -46,17 +46,6 @@ describe('sanitizeRepoIcon', () => {
src: 'data:image/png;base64,aGVsbG8=',
source: 'upload'
})
expect(
sanitizeRepoIcon({
type: 'image',
src: 'data:image/svg+xml;base64,PHN2Zz48L3N2Zz4=',
source: 'upload'
})
).toEqual({
type: 'image',
src: 'data:image/svg+xml;base64,PHN2Zz48L3N2Zz4=',
source: 'upload'
})
})
it('keeps null as an explicit reset', () => {
@@ -78,6 +67,13 @@ describe('sanitizeRepoIcon', () => {
source: 'upload'
})
).toBeUndefined()
expect(
sanitizeRepoIcon({
type: 'image',
src: 'data:image/svg+xml;base64,PHN2Zz48L3N2Zz4=',
source: 'upload'
})
).toBeUndefined()
expect(
sanitizeRepoIcon({
type: 'image',
@@ -85,19 +81,5 @@ describe('sanitizeRepoIcon', () => {
source: 'github'
})
).toBeUndefined()
expect(
sanitizeRepoIcon({
type: 'image',
src: 'https://example.com/icon.png',
source: 'favicon'
})
).toBeUndefined()
expect(
sanitizeRepoIcon({
type: 'image',
src: 'https://example.com/icon.png',
source: 'upload'
})
).toBeUndefined()
})
})
+1 -1
View File
@@ -14,7 +14,7 @@ const isRepoIconImageSource = (value: string): value is RepoIconImageSource =>
function isSupportedImageSrc(src: string, source: RepoIconImageSource): boolean {
if (source === 'upload') {
return /^data:image\/(?:png|svg\+xml);base64,[A-Za-z0-9+/=\s]+$/i.test(src)
return /^data:image\/png;base64,[A-Za-z0-9+/=\s]+$/i.test(src)
}
let url: URL