Environment & Bootstrap Stability: Fix Ghost Account and Modernize PWA Manifest
- Resolved 'Ghost Account' warning by updating layout hydration to align with V3 ID Vision (account_id vs account_id_random). - Improved site lookup reliability using Agent API Key and structured EQ filters for exact FQDN matching (including ports). - Modernized PWA manifest with maskable icons (PNG/WebP), app shortcuts, and unique installation IDs. - Implemented automatic Electron 'Native' mode detection in root layout. - Fixed stale API URLs in Launcher native file download logic. - Added V3 migration documentation and JWT verification test scripts.
This commit is contained in:
@@ -131,9 +131,15 @@ export async function lookup_site_domain_v3({
|
||||
delete guest_api_cfg.account_id;
|
||||
|
||||
const search_query = {
|
||||
q: fqdn
|
||||
and: [{ field: 'fqdn', op: 'eq', value: fqdn }]
|
||||
};
|
||||
|
||||
if (log_lvl) {
|
||||
console.log(`BOOTSTRAP SEARCH: fqdn=${fqdn}`);
|
||||
console.log(`BOOTSTRAP HEADERS:`, guest_api_cfg.headers);
|
||||
console.log(`BOOTSTRAP QUERY:`, JSON.stringify(search_query));
|
||||
}
|
||||
|
||||
// We use search because we are looking up by a unique field (fqdn) rather than ID.
|
||||
// The backend should return a list, but since FQDN is unique, it will have 1 item.
|
||||
const result_li = await api.search_ae_obj_v3({
|
||||
@@ -147,6 +153,8 @@ export async function lookup_site_domain_v3({
|
||||
log_lvl
|
||||
});
|
||||
|
||||
if (log_lvl) console.log(`BOOTSTRAP RESULT:`, result_li);
|
||||
|
||||
if (result_li && result_li.length > 0) {
|
||||
const result = result_li[0];
|
||||
// Standardize and save to cache
|
||||
|
||||
Reference in New Issue
Block a user