@@ -785,10 +785,27 @@ fn bar(filled: u16, total: u16) -> String {
785785 s
786786}
787787
788+ /// Splash hint row: full, 40-col, or short — picked by character budget.
789+ /// Uses the full area width (not [`inner_width`]) so `v0.1.10` still fits
790+ /// the 40-column mid form `v{version} · / commands · @ files · ! shell`.
791+ pub ( crate ) fn splash_legend ( version : & str , width : usize ) -> String {
792+ let full_h = format ! ( "v{version} · {LAUNCH_HINTS}" ) ;
793+ let mid_h = format ! ( "v{version} · {LAUNCH_HINTS_NARROW}" ) ;
794+ if full_h. chars ( ) . count ( ) <= width {
795+ full_h
796+ } else if mid_h. chars ( ) . count ( ) <= width {
797+ mid_h
798+ } else {
799+ format ! ( "v{version} · / commands" )
800+ }
801+ }
802+
788803/// Launch header: `Welcome to Cortex, the coding agent CLI` then
789804/// `v{version} · / commands · …`. No fake `> cortex` or painted cwd.
790805fn paint_launch_header ( area : Rect , buf : & mut Buffer , full : bool ) -> u16 {
791- let w = inner_width ( area) ;
806+ // Full terminal width: the 40-col lock is exactly the mid hint budget
807+ // once the package version is seven characters (`v0.1.10`).
808+ let w = area. width . max ( 1 ) as usize ;
792809 let mut y = area. y ;
793810 let dim = Style :: default ( ) . fg ( TEXT_DIM ) ;
794811 let bold = Style :: default ( ) . fg ( TEXT ) . add_modifier ( Modifier :: BOLD ) ;
@@ -797,16 +814,7 @@ fn paint_launch_header(area: Rect, buf: &mut Buffer, full: bool) -> u16 {
797814 buf. set_string ( area. x + 17 , y, ", the coding agent CLI" , dim) ;
798815 y += 1 ;
799816 if full {
800- let version = env ! ( "CARGO_PKG_VERSION" ) ;
801- let full_h = format ! ( "v{version} · {LAUNCH_HINTS}" ) ;
802- let mid_h = format ! ( "v{version} · {LAUNCH_HINTS_NARROW}" ) ;
803- let hints = if full_h. chars ( ) . count ( ) <= w {
804- full_h
805- } else if mid_h. chars ( ) . count ( ) <= w {
806- mid_h
807- } else {
808- format ! ( "v{version} · / commands" )
809- } ;
817+ let hints = splash_legend ( env ! ( "CARGO_PKG_VERSION" ) , w) ;
810818 buf. set_string (
811819 area. x ,
812820 y,
0 commit comments