Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

feat: improve profile path visibility and existence checking

Marioa95b297340c9
diff --git a/internal/bridge/api.go b/internal/bridge/api.go
index 89213920..7cf26c5f 100644
--- a/internal/bridge/api.go
+++ b/internal/bridge/api.go
@@ -72,6 +72,7 @@ type ProfileInfo struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Path string `json:"path,omitempty"` // File system path to profile directory
+ PathExists bool `json:"pathExists,omitempty"` // Whether the path exists on disk
Created time.Time `json:"created"`
LastUsed time.Time `json:"lastUsed"`
DiskUsage int64 `json:"diskUsage"`
diff --git a/internal/dashboard/dashboard/profiles.js b/internal/dashboard/dashboard/profiles.js
index aec8429c..1ffceca7 100644
--- a/internal/dashboard/dashboard/profiles.js
+++ b/internal/dashboard/dashboard/profiles.js
@@ -437,9 +437,19 @@ async function viewProfileDetails(name, instanceID) {
tabProfile += '<div style="font-size:13px;color:var(--text-subtle);margin-bottom:4px">PID: <span style="color:var(--text)">' + esc(String(pid)) + '</span></div>';
tabProfile += '<div style="font-size:13px;color:var(--text-subtle);margin-bottom:4px">Size: <span style="color:var(--text)">' + (profileInfo.sizeMB ? profileInfo.sizeMB.toFixed(0) + ' MB' : '—') + '</span></div>';
tabProfile += '<div style="font-size:13px;color:var(--text-subtle);margin-bottom:4px">Source: <span style="color:var(--text)">' + esc(profileInfo.source || '—') + '</span></div>';
- if (profileInfo.path) {
- tabProfile += '<div style="font-size:13px;color:var(--text-subtle);margin-bottom:4px">Path: <span style="color:var(--text);font-size:11px;font-family:var(--font-mono)">' + esc(profileInfo.path) + '</span></div>';
+
+ // Path section with existence check
+ let pathValue = profileInfo.path || '(not created)';
+ let pathStyle = 'font-size:11px;font-family:var(--font-mono)';
+ if (!profileInfo.pathExists) {
+ pathStyle += ';color:var(--error-light);opacity:0.7';
+ if (!profileInfo.path) {
+ pathValue = '(profile directory not created)';
+ } else {
+ pathValue = profileInfo.path + ' (not found)';
+ }
}
+ tabProfile += '<div style="font-size:13px;color:var(--text-subtle);margin-bottom:4px">Path: <span style="color:var(--text);' + pathStyle + '">' + esc(pathValue) + '</span></div>';
if (profileInfo.chromeProfileName) {
tabProfile += '<div style="font-size:13px;color:var(--text-subtle);margin-bottom:4px">Chrome: <span style="color:var(--text)">' + esc(profileInfo.chromeProfileName) + '</span></div>';
}
diff --git a/internal/profiles/profiles.go b/internal/profiles/profiles.go
index 20279ca3..e80d0479 100644
--- a/internal/profiles/profiles.go
+++ b/internal/profiles/profiles.go
@@ -109,10 +109,17 @@ func (pm *ProfileManager) List() ([]bridge.ProfileInfo, error) {
// Mark as temporary if it's an auto-generated instance profile
isTemporary := strings.HasPrefix(entry.Name(), "instance-")
+ // Check if path exists
+ pathExists := true
+ if _, err := os.Stat(info.Path); err != nil {
+ pathExists = false
+ }
+
profiles = append(profiles, bridge.ProfileInfo{
ID: info.ID,
Name: info.Name,
Path: info.Path,
+ PathExists: pathExists,
Created: info.CreatedAt,
Temporary: isTemporary,
DiskUsage: int64(info.SizeMB * 1024 * 1024),