Fixes T9798. That task has good repro instructions.
In sub-views, we don't link the "History" icon correctly -- we only link it to history/README instead of history/path/to/README. Add the full path.
Also canonicalize the paths in a slightly prettier and more consistenty way.