Skip to content

Fix/issue 2 bugs and tests - #3

Open
gauravds wants to merge 7 commits into
mainfrom
fix/issue-2-bugs-and-tests
Open

Fix/issue 2 bugs and tests#3
gauravds wants to merge 7 commits into
mainfrom
fix/issue-2-bugs-and-tests

Conversation

@gauravds

Copy link
Copy Markdown
Contributor

#2 partially done

gauravds added 7 commits July 24, 2026 12:56
- Set MINISHARE_DAEMON=1 env var on child process for proper daemon detection
- Add stdin raw mode for host terminal so local I/O works correctly
- Echo pty output to local stdout so host can see terminal activity
- Pipe host stdin to pty for interactive use while sharing
- Sync initial pty size from terminal dimensions
- Handle SIGWINCH signal for dynamic terminal resize
- Parse viewer resize control messages (SOH+JSON protocol)
- Use sync.Once for safe channel close to prevent panics
- Use \r\n for raw mode compatible output formatting

Fixes #2 (bugs 1 & 2)
- Add term.onResize handler that sends resize dimensions to host
- Use SOH-prefixed JSON protocol for resize control messages
- Send initial terminal dimensions on data channel open
- Add comprehensive mobile CSS: responsive padding, height, wrapping
- Use dvh units for dynamic viewport height on mobile
- Fix setup overlay wrapping on small screens
- Improve terminal container padding and dot sizes on mobile

Fixes #2 (bug 3)
- Add Download & Install section with platform cards for:
  macOS (Apple Silicon), macOS (Intel), Linux (x86_64), Windows
- Each card links to GitHub releases/latest page
- Windows card notes host mode unavailable, includes manual install steps
- Add 'View All Releases on GitHub' link
- Add 'Download' nav link in navigation bar
- Add 'Download Latest Release' button in CTA section
- Responsive grid: 4-col → 2-col → 1-col on mobile

Fixes #2 (bugs 4 & 5)
- TestGenerateUUID_Format: validates UUID v4 format
- TestGenerateUUID_Unique: ensures no duplicates in 100 generations
- TestParseDurationStr: tests hours, days, months, years, never, errors
- TestCleanInput: whitespace/quote stripping
- TestConfigRoundTrip: SaveConfig → LoadConfig serialization
- TestLoadConfig_MissingFile: defaults on missing file
- TestLoadConfig_CorruptFile: defaults on corrupt JSON
- TestEncodeDecodePayload: encode-decode round-trip
- TestParseBlockArgs: comma/space splitting
- TestBlockUnblockIntegration: full block/unblock lifecycle
- TestHandleResetCommand_All: reset all settings
- TestHandleResetCommand_Server: partial reset preserves other settings
- TestGetConfigPath_FromEnv: env var override
- TestDaemonPaths: PID/UUID/log path consistency
- TestProcessExists: own PID and invalid PID

All 16 tests passing
- TestHealthEndpoint: GET /health returns 200 OK
- TestCreateSession: POST with UUID returns same UUID
- TestCreateSession_GeneratesUUID: auto-generates when UUID absent
- TestCreateSession_MissingOffer: 400 on missing offer
- TestCreateSession_InvalidJSON: 400 on malformed JSON
- TestCreateSession_MethodNotAllowed: 405 on GET
- TestGetOffer: retrieves previously stored offer
- TestGetOffer_NotFound: 404 for missing sessions
- TestPostAndGetAnswer: full answer round-trip
- TestPostAnswer_MissingAnswer: 400 on empty answer
- TestGetAnswer_EmptyBeforeSet: empty string before answer set
- TestRootPage: serves index.html with text/html
- TestAppPage: serves app.html
- TestAppPage_WithUUID: serves app.html for /app/{uuid}
- TestNotFoundPage: 404 for unknown paths
- TestInvalidAction: 404 for unknown session actions
- TestNewStore: store initialization
- TestGenerateUUID_Server: UUID generation
- TestFullSignalingFlow: end-to-end signaling
- TestLandingPage_ContainsPlatformDownloads: verifies bug 4/5 fix

All 20 tests passing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant