-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quality of Life improvements to local development dashboard #1014
Quality of Life improvements to local development dashboard #1014
Conversation
This commit modifies the daemon to cache metadata for apps on the filesystem, this then allows the local dev dash to access this metadata without having to have the app running via `encore run`. This commit then tidies up a bunch of code around the dev dash API to standardise the status response allowing us to make much faster updates in the dev dash relating to the status of the app. Finnally I've added the ability for the dev dash to pass a correlation id to the daemon when it makes an api-call, allowing the dev dash to filter for logs relating to the request it made.
All committers have signed the CLA. |
name = filepath.Base(r.App.Root()) | ||
|
||
// Load all the apps we know about | ||
allApp, err := h.apps.List() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we ever delete from this list? Like if the user deletes the directory? We probably should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we do already do that:
// List lists all known apps.
func (mgr *Manager) List() ([]*Instance, error) {
roots, err := mgr.listRoots()
if err != nil {
return nil, err
}
var apps []*Instance
for _, root := range roots {
app, err := mgr.resolve(root)
if errors.Is(err, fs.ErrNotExist) {
log.Debug().Str("root", root).Msg("app no longer exists, skipping")
// Delete the
_, _ = mgr.db.Exec(`DELETE FROM app WHERE root = ?`, root)
continue
} else if err != nil {
log.Error().Err(err).Str("root", root).Msg("unable to resolve app")
continue
}
apps = append(apps, app)
}
return apps, nil
}
…ting where possible
9ea1b14
to
c4be165
Compare
This PR adds the capability to view all Encore apps via the local dashboard, regardless of if they are currently running or not, as well as several other UI improvements to the dashboard;
Offline apps are greyed out on lists, but can still be navigated
The API explorer now shows logs which were emitted during the API call
The dashboard now tells you when the app is compiling or just freshly restarted
Compile errors are now shown on the dashboard