@@ -354,6 +354,27 @@ func (s *CCStatuslineTestSuite) TestFormatStatuslineOutput_SessionCostWithoutLin
354354 assert .NotContains (s .T (), output , "coding-agent/session/" )
355355}
356356
357+ func (s * CCStatuslineTestSuite ) TestFormatStatuslineOutput_TimeWithProfileLink () {
358+ output := formatStatuslineOutput ("claude-opus-4" , 1.23 , 4.56 , 3661 , 75.0 , "main" , false , nil , nil , "testuser" , "https://shelltime.xyz" , "session-abc123" )
359+
360+ // Should contain OSC8 link wrapping time section to user profile
361+ assert .Contains (s .T (), output , "shelltime.xyz/users/testuser" )
362+ assert .Contains (s .T (), output , "1h1m" )
363+ }
364+
365+ func (s * CCStatuslineTestSuite ) TestFormatStatuslineOutput_TimeWithoutProfileLink () {
366+ // No userLogin - should not have profile link on time
367+ output := formatStatuslineOutput ("claude-opus-4" , 1.23 , 4.56 , 3661 , 75.0 , "main" , false , nil , nil , "" , "https://shelltime.xyz" , "session-abc123" )
368+ assert .Contains (s .T (), output , "1h1m" )
369+ // The time section should not contain a link to users/ profile
370+ // Count occurrences of "shelltime.xyz/users/" - should only be in session cost and daily cost links
371+ assert .NotContains (s .T (), output , "shelltime.xyz/users//" )
372+
373+ // No webEndpoint - should not have profile link on time
374+ output = formatStatuslineOutput ("claude-opus-4" , 1.23 , 4.56 , 3661 , 75.0 , "main" , false , nil , nil , "testuser" , "" , "session-abc123" )
375+ assert .Contains (s .T (), output , "1h1m" )
376+ }
377+
357378func (s * CCStatuslineTestSuite ) TestFormatStatuslineOutput_WithQuota () {
358379 fh := 45.0
359380 sd := 23.0
0 commit comments