Monorepo for Tangled tangled.org

appview/reporesolver: fix current directory extraction for tree paths #933

path.Dir on extractPathAfterRef returned the parent directory, which broke relative link resolution in markdown when viewing directories. extractCurrentDir now handles blob and tree paths separately: blob paths return the parent dir, tree paths return the directory itself

Signed-off-by: moshyfawn email@moshyfawn.dev

0
by moshyfawn.dev 2 comments
expand 2 commits
appview/reporesolver: fix current directory extraction for tree paths
appview/reporesolver: add tests for extractCurrentDir

You can test this at https://tangled.org/slices.network/quickslice/tree/main/docs - try the "Build Statusphere with Quickslice" link in the README; it should now correctly go to docs/tutorial.md instead of pointing to the repo root.

lgtm! thanks for the contribution, could you squash both commits into one (IMO makes sense when together) and rebase on the latest master?

sign up or login to add to the discussion
1
by moshyfawn.dev 2 comments
expand 1 commit
appview/reporesolver: fix current directory extraction for tree paths

Thank you! Tangled鈥檚 a great piece of software and it鈥檚 been a blast hacking at it 馃敟

I鈥檓 not a casual Nix user, so I ran into quite a few issues getting the full stack setup working on my Mac. I had to hack some code up and populate the local DB with a mirror of my repos. I think I messed something up during cleanup, and now I have 2 extra repos that still show up and never resolve, even though I鈥檝e deleted them from my own knot and cleaned up my PDS records. I think I鈥檝e almost gotten it to build with the OrbStack NixOS setup, though I can鈥檛 quite get the appview to be served; it serves an empty shell for me. Has anyone on the team done a build with a similar setup?

thanks for the patch! we have some instructions on setting up nix on macos + setting up the appview here (sorry for being pedantic, but this is just in case you haven't already seen this page!).

as for the bug itself, did you create these repos on the tangled appview (tangled.org, not local dev)? in which case, it makes sense because we don't yet propagate or handle deletion events from the firehose for repo records, so we tend to have some stale state cached on the appview. let me know if you'd like me to delete these on our end!

pull request successfully merged
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:sshwio5obbx4zjfrn3fhsen6/sh.tangled.repo.pull/3mbsmvtynk422