go to end/beginning of line on hitting end of history

for francis fukuyama

fixes #503
dead code
set notebook visible in various cases

- on forking
- on importing from repo
- in importing from file
- on loading by id when it's mine

fixes #498