@@ -1086,6 +1086,23 @@ final class NoturcodeCoreTests: XCTestCase {
10861086 XCTAssertEqual ( store. sessions. map ( \. name) , [ " two " ] )
10871087 }
10881088
1089+ @MainActor
1090+ func testSessionStoreUsesOnlyFirstNonEmptyLineOfConnectionName( ) throws {
1091+ let directory = FileManager . default. temporaryDirectory. appendingPathComponent ( UUID ( ) . uuidString)
1092+ let store = SessionStore ( persistence: SessionPersistence ( fileURL: directory. appendingPathComponent ( " sessions.json " ) ) )
1093+
1094+ _ = store. apply ( BridgeEvent (
1095+ kind: . connect,
1096+ source: . codex,
1097+ sessionID: " multiline-name " ,
1098+ timestamp: Date ( timeIntervalSince1970: 1_000 ) ,
1099+ name: " nc \n this is prompt text, not the session name " ,
1100+ terminalSessionID: " w0t1:NAME "
1101+ ) )
1102+
1103+ XCTAssertEqual ( store. sessions. first? . name, " nc " )
1104+ }
1105+
10891106 @MainActor
10901107 func testHarnessSessionEndDoesNotRemoveExplicitConnection( ) throws {
10911108 let directory = FileManager . default. temporaryDirectory. appendingPathComponent ( UUID ( ) . uuidString)
@@ -1147,9 +1164,14 @@ final class NoturcodeCoreTests: XCTestCase {
11471164 . deletingLastPathComponent ( )
11481165 let surface = try String ( contentsOf: repository. appendingPathComponent ( " Sources/NoturcodeApp/NotchSurfaceView.swift " ) )
11491166 let sessions = try String ( contentsOf: repository. appendingPathComponent ( " Sources/NoturcodeApp/SessionViews.swift " ) )
1167+ let coordinator = try String ( contentsOf: repository. appendingPathComponent ( " Sources/NoturcodeApp/DisplayCoordinator.swift " ) )
11501168
11511169 XCTAssertTrue ( surface. contains ( " value: surfaceHeight " ) )
11521170 XCTAssertFalse ( sessions. contains ( " .transition(.opacity.combined(with: .move(edge: .top))) " ) )
1171+ XCTAssertTrue ( coordinator. contains ( " return summaryAllowance " ) )
1172+ XCTAssertFalse ( coordinator. contains ( " activityExpandedSessionID " ) )
1173+ XCTAssertFalse ( coordinator. contains ( " toggleActivityExpansion " ) )
1174+ XCTAssertFalse ( coordinator. contains ( " hoveredSessionID == nil ? 0 : 95 " ) )
11531175 }
11541176
11551177 func testExpandedNotchMorphsContentInsideOnePersistentHeader( ) throws {
@@ -1203,6 +1225,21 @@ final class NoturcodeCoreTests: XCTestCase {
12031225 XCTAssertFalse ( sessions. contains ( " if isHovered || isActivityExpanded " ) )
12041226 }
12051227
1228+ func testExpandedNotchSessionRowKeepsFullNameAndHidesTokenCounter( ) throws {
1229+ let repository = URL ( fileURLWithPath: #filePath)
1230+ . deletingLastPathComponent ( )
1231+ . deletingLastPathComponent ( )
1232+ . deletingLastPathComponent ( )
1233+ let source = try String ( contentsOf: repository. appendingPathComponent ( " Sources/NoturcodeApp/SessionViews.swift " ) )
1234+ let rowStart = try XCTUnwrap ( source. range ( of: " private struct SessionRow " ) )
1235+ let nextStart = try XCTUnwrap ( source. range ( of: " private struct ConversationSidebarToggle " ) )
1236+ let row = String ( source [ rowStart. lowerBound..< nextStart. lowerBound] )
1237+
1238+ XCTAssertTrue ( row. contains ( " .fixedSize(horizontal: true, vertical: false) " ) )
1239+ XCTAssertFalse ( row. contains ( " if let tokens = session.tokens " ) )
1240+ XCTAssertFalse ( row. contains ( " DurationFormatting.tokens " ) )
1241+ }
1242+
12061243 func testExpandedNotchShowsRotatingQuoteAndKeepsEverySessionInList( ) throws {
12071244 let repository = URL ( fileURLWithPath: #filePath)
12081245 . deletingLastPathComponent ( )
0 commit comments