Skip to content

feat: add list -a flag to show exited sessions#17

Open
ricardovfreixo wants to merge 1 commit intomobydeck:mainfrom
ricardovfreixo:feat/list-exited
Open

feat: add list -a flag to show exited sessions#17
ricardovfreixo wants to merge 1 commit intomobydeck:mainfrom
ricardovfreixo:feat/list-exited

Conversation

@ricardovfreixo
Copy link

Summary

  • atch list currently only shows running and stale sessions (sockets)
  • Sessions that exited cleanly leave a .log file but no socket, making them invisible
  • atch list -a adds a second pass that scans for .log files without a matching socket and displays them with [exited]

Example

$ atch list
work                     since 5m 3s ago [attached]

$ atch list -a
work                     since 5m 3s ago [attached]
some-other-work          since 18m 6s ago [exited]

Test plan

  • atch start test -- sh -c 'echo hello; sleep 1' then wait for exit
  • atch list — should NOT show test
  • atch list -a — should show test with [exited] and correct age
  • atch test — should replay the log from the exited session
  • atch clear test then atch list -atest should disappear
  • atch list -a with no exited sessions — no extra output, same as atch list

Scan for .log files without a matching socket and display them
with [exited] tag. Allows users to see sessions that ended
cleanly but still have replay logs available.
@arthurpro
Copy link
Member

@ricardovfreixo great addition, thank you!
can you add test coverage? or I can do it after merging. let me know please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants