Merge pull request #3583 from jeremymcs/fix/welcome-screen-full-width
fix(ui): remove 200-column cap on welcome screen width
This commit is contained in:
commit
24e0856950
2 changed files with 16 additions and 1 deletions
|
|
@ -83,3 +83,18 @@ test('omits remote channel when not provided', () => {
|
|||
assert.ok(!out.includes('Slack'), 'should not show Slack when no remote')
|
||||
assert.ok(!out.includes('Telegram'), 'should not show Telegram when no remote')
|
||||
})
|
||||
|
||||
test('separator lines extend to full terminal width on wide terminals', (t) => {
|
||||
const origColumns = process.stderr.columns
|
||||
;(process.stderr as any).columns = 250
|
||||
t.after(() => { ;(process.stderr as any).columns = origColumns })
|
||||
|
||||
const out = strip(capture({ version: '1.0.0' }))
|
||||
const lines = out.split('\n')
|
||||
// Top and bottom separator bars should be 249 chars (columns - 1)
|
||||
const separatorLines = lines.filter(l => /^─+$/.test(l.trim()))
|
||||
assert.ok(separatorLines.length >= 2, 'expected at least 2 full-width separator lines')
|
||||
for (const sep of separatorLines) {
|
||||
assert.equal(sep.trim().length, 249, `separator should be 249 chars wide, got ${sep.trim().length}`)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export function printWelcomeScreen(opts: WelcomeScreenOptions): void {
|
|||
const { version, modelName, provider, remoteChannel } = opts
|
||||
const shortCwd = getShortCwd()
|
||||
const branch = getGitBranch()
|
||||
const termWidth = Math.min((process.stderr.columns || 80) - 1, 200)
|
||||
const termWidth = (process.stderr.columns || 80) - 1
|
||||
|
||||
// Narrow terminal fallback
|
||||
if (termWidth < 70) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue