feat(stalker): add secure portal session compatibility - #1290
Conversation
|
Too many files changed for review. ( Bypass the limit by tagging |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27488bea90
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| data: episodes.episodes.map((episode) => | ||
| compact({ | ||
| id: episode.id, |
There was a problem hiding this comment.
Preserve the episode discriminator in compatibility responses
For a typed full-session portal using lazy Ministra VOD is_series, fetchVodSeriesEpisodes() passes this compatibility response to with-stalker-series.feature.ts, which retains only entries where item.is_episode === true. These mapped entries omit is_episode, so every returned episode is discarded and the selected season appears empty; include the legacy discriminator when reconstructing this response.
AGENTS.md reference: AGENTS.md:L426-L429
Useful? React with 👍 / 👎.
| if (runId !== this.runId) { | ||
| return; |
There was a problem hiding this comment.
Roll back an import when persistence finishes after cancellation
If the user closes the add-playlist dialog while the persistStalkerConnection() observable is pending, ngOnDestroy() changes runId and discards the provisional attempt, but the database write can then complete and this branch merely returns. The canceled playlist consequently remains persisted without session promotion or an NgRx update and unexpectedly reappears after reload; the stale path needs to restore/delete the completed write or cancellation must be prevented once persistence begins.
Useful? React with 👍 / 👎.
| readonly form = this.formBuilder.group({ | ||
| username: [ | ||
| this.data.username ?? '', | ||
| [Validators.required, Validators.pattern(/\S/)], | ||
| ], | ||
| password: [''], |
There was a problem hiding this comment.
Require a password before submitting credential challenges
When a portal requests second-step credentials, this form permits a username with an empty password even though normalizeCredentials() in the main-process auth session rejects password.length === 0. Submitting consumes the one-time challenge and ends the attempt with an invalid-identity failure instead of keeping the dialog actionable; the import flow has the same mismatch because its validation button checks only the username.
Useful? React with 👍 / 👎.
Stalker playback regression fixAdded focused compatibility coverage for portals that require literal Validation:
|
Summary
Changes
Session and authentication
Playback and persistence
Replay, UX, and documentation
.changes/stalker-session-compatibility.md.Current master integration
createRandomIdmigration and the split Settings facade/spec architecture.Testing
Known baseline failure
The fresh post-merge full Electron run exercised 115 suites: 113 passed, the independently reproducible pre-existing Xtream timing assertion still failed, and one merge-only TypeScript global-scope collision was found. The collision was fixed and its two suites now pass 21/21. The only remaining unaddressed failure is
apps/electron-backend/src/app/events/xtream.events.spec.ts, whereabortSignal?.abortedisundefinedrather thanfalse; it is outside this PR scope.Deliberate follow-ups
This PR implements the approved Option B / Stage 1 foundation. Semantic SQLite/FTS caching with adaptive pagination and authenticated context consumers for web/download playback remain explicit Stage 2/3 follow-ups.