Repository navigation
fix(frontend): dedupe contact-table loads and scope mine table to the active run - #2908
Merged
Merged
Conversation
malek10xdev
force-pushed
the
fix/mining-table-session-scope
branch
from
September 23, 2026 22:46
b3a54cf to
67dbbfd
Compare
The table-lifecycle migration moved column initialization into useContactsTableData, where initializeVisibleColumns only ran after the async full load. Until it resolved, the store sat at its checkbox-only init value, so the table rendered with (almost) no visible fields. - set the contacts defaults synchronously at mount, matching main - treat a stored empty selection as "no preference" and fall through to data-driven columns instead of rendering an empty table - cover both paths with unit tests
After merging main, the contacts store's auto-imported useSupabaseUser resolves to the @nuxtjs/supabase runtime composable instead of a global, so the stub no longer applied. Mock the resolved module paths (the package only exports ".") alongside the global stub.
The "Mining in progress - Passive" row rendered the shared scanned/extracted/cleaned refs, which only ever move for a foreground run the user started themselves: those are fed by the single foreground SSE in startProgressListener, and a passive run happens server-side. So a healthy passive run showed 0/0/0 for its whole duration. - subscribe one independent progress stream per in-progress passive run (own AbortController, so it cannot cancel or be cancelled by the shared sse singleton the foreground mine page uses) - reconcile those streams from the existing /sources polling loop, which already refreshes passive state, so a run that starts while the page is open shows up without a reload - read the counters per source in the template, keeping the shared refs for foreground runs - drop streams and cached counters when a run ends or mining resets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves contact-table data ownership out of
MiningTableinto page-level orchestration, so/minecan never trigger a full-table load.MiningTableis display-only: takescontacts+loadingprops, noloadContactsData, no prefetch, no subscriptions, no store resets. Filters/selection/actions untouched.useTableData.tsowns both page lifecycles:useContactsTableData(/contacts): fullget_contacts_tableload with refine fallback, normalization, visible columns,?mining_id=deep link, contacts realtime subscription, unmount reset.useMiningTableData(/mine): subscribesminerealtime while a task is active, stops onminingCompleted, resets on unmount. Zero full-load calls./contactsnow simply loads the table and connects realtime — the realtime-reconnect recovery reload was removed.mining-table.ts(inlined its single helper intoMiningTable), removedshouldReloadOnReconnectand the now-unneeded realtime scope/connect state, and dropped the extragetDefaultVisibleColumnsutil.Test Plan
npm run lint: 0 errors;nuxi typecheck: only pre-existing baseline errors/mineissues 0get_contacts_table;/contactsloads exactly once and renders; no app console errors