remove some noise from debug logging
This commit is contained in:
@@ -986,12 +986,12 @@ export default class HomeView extends Vue {
|
|||||||
* Called by FeedFilters component when filters change
|
* Called by FeedFilters component when filters change
|
||||||
*/
|
*/
|
||||||
async reloadFeedOnChange() {
|
async reloadFeedOnChange() {
|
||||||
logger.debug("[HomeView] 🔄 reloadFeedOnChange() called - refreshing feed");
|
logger.debug("[HomeView] reloadFeedOnChange() called - refreshing feed");
|
||||||
|
|
||||||
// Get current settings without overriding with defaults
|
// Get current settings without overriding with defaults
|
||||||
const settings = await this.$accountSettings(this.activeDid);
|
const settings = await this.$accountSettings(this.activeDid);
|
||||||
|
|
||||||
logger.debug("[HomeView] 📊 Current filter settings:", {
|
logger.debug("[HomeView] Current filter settings:", {
|
||||||
filterFeedByVisible: settings.filterFeedByVisible,
|
filterFeedByVisible: settings.filterFeedByVisible,
|
||||||
filterFeedByNearby: settings.filterFeedByNearby,
|
filterFeedByNearby: settings.filterFeedByNearby,
|
||||||
searchBoxes: settings.searchBoxes?.length || 0,
|
searchBoxes: settings.searchBoxes?.length || 0,
|
||||||
@@ -1001,7 +1001,7 @@ export default class HomeView extends Vue {
|
|||||||
this.isFeedFilteredByNearby = !!settings.filterFeedByNearby;
|
this.isFeedFilteredByNearby = !!settings.filterFeedByNearby;
|
||||||
this.isAnyFeedFilterOn = checkIsAnyFeedFilterOn(settings);
|
this.isAnyFeedFilterOn = checkIsAnyFeedFilterOn(settings);
|
||||||
|
|
||||||
logger.debug("[HomeView] 🎯 Updated filter states:", {
|
logger.debug("[HomeView] Updated filter states:", {
|
||||||
isFeedFilteredByVisible: this.isFeedFilteredByVisible,
|
isFeedFilteredByVisible: this.isFeedFilteredByVisible,
|
||||||
isFeedFilteredByNearby: this.isFeedFilteredByNearby,
|
isFeedFilteredByNearby: this.isFeedFilteredByNearby,
|
||||||
isAnyFeedFilterOn: this.isAnyFeedFilterOn,
|
isAnyFeedFilterOn: this.isAnyFeedFilterOn,
|
||||||
@@ -1035,17 +1035,9 @@ export default class HomeView extends Vue {
|
|||||||
/**
|
/**
|
||||||
* Checks if coordinates fall within any search box
|
* Checks if coordinates fall within any search box
|
||||||
*
|
*
|
||||||
* @internal
|
|
||||||
* @callGraph
|
|
||||||
* Called by: shouldIncludeRecord()
|
|
||||||
* Calls: None
|
|
||||||
*
|
|
||||||
* @chain
|
* @chain
|
||||||
* shouldIncludeRecord() -> latLongInAnySearchBox()
|
* shouldIncludeRecord() -> latLongInAnySearchBox()
|
||||||
*
|
*
|
||||||
* @requires
|
|
||||||
* - this.searchBoxes
|
|
||||||
*
|
|
||||||
* @param lat Latitude to check
|
* @param lat Latitude to check
|
||||||
* @param long Longitude to check
|
* @param long Longitude to check
|
||||||
* @returns true if coordinates are within any search box
|
* @returns true if coordinates are within any search box
|
||||||
@@ -1070,29 +1062,11 @@ export default class HomeView extends Vue {
|
|||||||
* - Updates last viewed claim ID
|
* - Updates last viewed claim ID
|
||||||
* - Handles paging if needed
|
* - Handles paging if needed
|
||||||
*
|
*
|
||||||
* @internal
|
|
||||||
* @callGraph
|
|
||||||
* Called by: loadFeedData(), manual refresh
|
|
||||||
* Calls:
|
|
||||||
* - retrieveGives()
|
|
||||||
* - processFeedResults()
|
|
||||||
* - updateFeedLastViewedId()
|
|
||||||
* - handleFeedError()
|
|
||||||
*
|
|
||||||
* @chain
|
* @chain
|
||||||
* loadFeedData() -> updateAllFeed() -> retrieveGives()
|
* loadFeedData() -> updateAllFeed() -> retrieveGives()
|
||||||
*
|
|
||||||
* @requires
|
|
||||||
* - this.apiServer
|
|
||||||
* - this.feedPreviousOldestId
|
|
||||||
*
|
|
||||||
* @modifies
|
|
||||||
* - this.isFeedLoading
|
|
||||||
* - this.feedData (via processFeedResults)
|
|
||||||
* - this.feedLastViewedClaimId (via updateFeedLastViewedId)
|
|
||||||
*/
|
*/
|
||||||
async updateAllFeed() {
|
async updateAllFeed() {
|
||||||
logger.debug("[HomeView] 🚀 updateAllFeed() called", {
|
logger.debug("[HomeView] updateAllFeed() called", {
|
||||||
isFeedLoading: this.isFeedLoading,
|
isFeedLoading: this.isFeedLoading,
|
||||||
currentFeedDataLength: this.feedData.length,
|
currentFeedDataLength: this.feedData.length,
|
||||||
isAnyFeedFilterOn: this.isAnyFeedFilterOn,
|
isAnyFeedFilterOn: this.isAnyFeedFilterOn,
|
||||||
@@ -1109,7 +1083,7 @@ export default class HomeView extends Vue {
|
|||||||
this.feedPreviousOldestId,
|
this.feedPreviousOldestId,
|
||||||
);
|
);
|
||||||
|
|
||||||
logger.debug("[HomeView] 📡 Retrieved gives from API", {
|
logger.debug("[HomeView] Retrieved gives from API", {
|
||||||
resultsCount: results.data.length,
|
resultsCount: results.data.length,
|
||||||
endOfResults,
|
endOfResults,
|
||||||
});
|
});
|
||||||
@@ -1120,7 +1094,7 @@ export default class HomeView extends Vue {
|
|||||||
await this.processFeedResults(results.data);
|
await this.processFeedResults(results.data);
|
||||||
await this.updateFeedLastViewedId(results.data);
|
await this.updateFeedLastViewedId(results.data);
|
||||||
|
|
||||||
logger.debug("[HomeView] 📝 Processed feed results", {
|
logger.debug("[HomeView] Processed feed results", {
|
||||||
processedCount: this.feedData.length,
|
processedCount: this.feedData.length,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1144,26 +1118,13 @@ export default class HomeView extends Vue {
|
|||||||
/**
|
/**
|
||||||
* Processes feed results and adds them to feedData
|
* Processes feed results and adds them to feedData
|
||||||
*
|
*
|
||||||
* @internal
|
|
||||||
* @callGraph
|
|
||||||
* Called by: updateAllFeed()
|
|
||||||
* Calls: processRecord()
|
|
||||||
*
|
|
||||||
* @chain
|
* @chain
|
||||||
* updateAllFeed() -> processFeedResults()
|
* updateAllFeed() -> processFeedResults()
|
||||||
*
|
*
|
||||||
* @requires
|
|
||||||
* - this.feedData
|
|
||||||
* - this.feedPreviousOldestId
|
|
||||||
*
|
|
||||||
* @modifies
|
|
||||||
* - this.feedData
|
|
||||||
* - this.feedPreviousOldestId
|
|
||||||
*
|
|
||||||
* @param records Array of feed records to process
|
* @param records Array of feed records to process
|
||||||
*/
|
*/
|
||||||
private async processFeedResults(records: GiveSummaryRecord[]) {
|
private async processFeedResults(records: GiveSummaryRecord[]) {
|
||||||
logger.debug("[HomeView] 📝 Processing feed results:", {
|
logger.debug("[HomeView] Processing feed results:", {
|
||||||
inputRecords: records.length,
|
inputRecords: records.length,
|
||||||
currentFilters: {
|
currentFilters: {
|
||||||
isAnyFeedFilterOn: this.isAnyFeedFilterOn,
|
isAnyFeedFilterOn: this.isAnyFeedFilterOn,
|
||||||
@@ -1185,7 +1146,7 @@ export default class HomeView extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug("[HomeView] 📊 Feed processing results:", {
|
logger.debug("[HomeView] Feed processing results:", {
|
||||||
processed: processedCount,
|
processed: processedCount,
|
||||||
filtered: filteredCount,
|
filtered: filteredCount,
|
||||||
total: records.length,
|
total: records.length,
|
||||||
@@ -1198,32 +1159,9 @@ export default class HomeView extends Vue {
|
|||||||
/**
|
/**
|
||||||
* Processes a single record and returns it if it passes filters
|
* Processes a single record and returns it if it passes filters
|
||||||
*
|
*
|
||||||
* @internal
|
|
||||||
* @callGraph
|
|
||||||
* Called by: processFeedResults()
|
|
||||||
* Calls:
|
|
||||||
* - extractClaim()
|
|
||||||
* - extractGiverDid()
|
|
||||||
* - extractRecipientDid()
|
|
||||||
* - getFulfillsPlan()
|
|
||||||
* - shouldIncludeRecord()
|
|
||||||
* - extractProvider()
|
|
||||||
* - getProvidedByPlan()
|
|
||||||
* - createFeedRecord()
|
|
||||||
*
|
|
||||||
* @chain
|
* @chain
|
||||||
* updateAllFeed() -> processFeedResults() -> processRecord()
|
* updateAllFeed() -> processFeedResults() -> processRecord()
|
||||||
*
|
*
|
||||||
* @requires
|
|
||||||
* - this.isAnyFeedFilterOn
|
|
||||||
* - this.isFeedFilteredByVisible
|
|
||||||
* - this.isFeedFilteredByNearby
|
|
||||||
* - this.activeDid
|
|
||||||
* - this.allContacts
|
|
||||||
*
|
|
||||||
* @modifies
|
|
||||||
* - this.feedData (via createFeedRecord)
|
|
||||||
*
|
|
||||||
* @param record The record to process
|
* @param record The record to process
|
||||||
* @returns Processed record if it passes filters, null otherwise
|
* @returns Processed record if it passes filters, null otherwise
|
||||||
*/
|
*/
|
||||||
@@ -1237,7 +1175,7 @@ export default class HomeView extends Vue {
|
|||||||
const fulfillsPlan = await this.getFulfillsPlan(record);
|
const fulfillsPlan = await this.getFulfillsPlan(record);
|
||||||
|
|
||||||
// Log record details for debugging
|
// Log record details for debugging
|
||||||
logger.debug("[HomeView] 🔍 Processing record:", {
|
logger.debug("[HomeView] Processing record:", {
|
||||||
recordId: record.jwtId,
|
recordId: record.jwtId,
|
||||||
hasFulfillsPlan: !!fulfillsPlan,
|
hasFulfillsPlan: !!fulfillsPlan,
|
||||||
fulfillsPlanHandleId: record.fulfillsPlanHandleId,
|
fulfillsPlanHandleId: record.fulfillsPlanHandleId,
|
||||||
@@ -1249,14 +1187,12 @@ export default class HomeView extends Vue {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!this.shouldIncludeRecord(record, fulfillsPlan)) {
|
if (!this.shouldIncludeRecord(record, fulfillsPlan)) {
|
||||||
logger.debug("[HomeView] ❌ Record filtered out:", record.jwtId);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const provider = this.extractProvider(claim);
|
const provider = this.extractProvider(claim);
|
||||||
const providedByPlan = await this.getProvidedByPlan(provider);
|
const providedByPlan = await this.getProvidedByPlan(provider);
|
||||||
|
|
||||||
logger.debug("[HomeView] ✅ Record included:", record.jwtId);
|
|
||||||
return this.createFeedRecord(
|
return this.createFeedRecord(
|
||||||
record,
|
record,
|
||||||
claim,
|
claim,
|
||||||
@@ -1380,6 +1316,11 @@ export default class HomeView extends Vue {
|
|||||||
fulfillsPlan?: FulfillsPlan,
|
fulfillsPlan?: FulfillsPlan,
|
||||||
): boolean {
|
): boolean {
|
||||||
if (this.blockedContactDids.includes(record.issuerDid)) {
|
if (this.blockedContactDids.includes(record.issuerDid)) {
|
||||||
|
logger.debug("[HomeView] Record filtered (blocked contact):", {
|
||||||
|
recordId: record.jwtId,
|
||||||
|
issuerDid: record.issuerDid,
|
||||||
|
hint: "This issuer is in your contacts with 'don't watch their activity'. Visit their DID page and tap the eye button to show their content.",
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1406,24 +1347,26 @@ export default class HomeView extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add debug logging for nearby filter
|
// Add debug logging for any other filter that causes hiding
|
||||||
if (this.isFeedFilteredByNearby && record.fulfillsPlanHandleId) {
|
if (this.isFeedFilteredByNearby && record.fulfillsPlanHandleId) {
|
||||||
logger.debug("[HomeView] 🔍 Nearby filter check:", {
|
if (!anyMatch) {
|
||||||
recordId: record.jwtId,
|
logger.debug("[HomeView] Nearby filter check:", {
|
||||||
hasFulfillsPlan: !!fulfillsPlan,
|
recordId: record.jwtId,
|
||||||
hasLocation: !!(fulfillsPlan?.locLat && fulfillsPlan?.locLon),
|
hasFulfillsPlan: !!fulfillsPlan,
|
||||||
location: fulfillsPlan
|
hasLocation: !!(fulfillsPlan?.locLat && fulfillsPlan?.locLon),
|
||||||
? { lat: fulfillsPlan.locLat, lon: fulfillsPlan.locLon }
|
location: fulfillsPlan
|
||||||
: null,
|
? { lat: fulfillsPlan.locLat, lon: fulfillsPlan.locLon }
|
||||||
inSearchBox:
|
|
||||||
fulfillsPlan?.locLat && fulfillsPlan?.locLon
|
|
||||||
? this.latLongInAnySearchBox(
|
|
||||||
fulfillsPlan.locLat,
|
|
||||||
fulfillsPlan.locLon,
|
|
||||||
)
|
|
||||||
: null,
|
: null,
|
||||||
finalResult: anyMatch,
|
inSearchBox:
|
||||||
});
|
fulfillsPlan?.locLat && fulfillsPlan?.locLon
|
||||||
|
? this.latLongInAnySearchBox(
|
||||||
|
fulfillsPlan.locLat,
|
||||||
|
fulfillsPlan.locLon,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
finalResult: anyMatch,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return anyMatch;
|
return anyMatch;
|
||||||
|
|||||||
Reference in New Issue
Block a user