Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions src/folderPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,36 @@ export default {

const thisDir = subject.uri.endsWith('/') ? subject.uri : subject.uri + '/'
const indexThing = kb.sym(thisDir + 'index.ttl#this')
if (kb.holds(subject, UI.ns.ldp('contains'), indexThing.doc())) {
const detailsThing = kb.sym(thisDir + 'details.ttl#event')
const indexDoc = indexThing.doc()
const detailsDoc = detailsThing.doc()
const hasIndexDoc = kb.holds(subject, UI.ns.ldp('contains'), indexDoc)
const hasDetailsDoc = kb.holds(subject, UI.ns.ldp('contains'), detailsDoc)
const folderViewThing = hasIndexDoc
? indexThing
: hasDetailsDoc
? detailsThing
: undefined

if (folderViewThing) {
const sourceLabel = hasIndexDoc ? 'index' : 'details-fallback'
console.log(
'View of folder will be view of indexThing. Loading ' + indexThing
'[folder-pane] using ' + sourceLabel + ' view subject: ' + folderViewThing
)
Comment on lines +103 to 106
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This console.log runs on every render when index.ttl or details.ttl is present, which can be noisy in production and makes it harder to debug other issues. Consider removing it or gating it behind an explicit debug flag/logging facility so normal folder navigation doesn’t spam the console.

Copilot uses AI. Check for mistakes.
const packageDiv = div.appendChild(dom.createElement('div'))
packageDiv.classList.add('folderPanePackageDiv')
kb.fetcher.load(indexThing.doc()).then(function () {
kb.fetcher.load(folderViewThing.doc()).then(function () {
mainTable = packageDiv.appendChild(dom.createElement('table'))
context
.getOutliner(dom)
.GotoSubject(indexThing, true, undefined, false, undefined, mainTable)
.GotoSubject(
folderViewThing,
true,
undefined,
false,
undefined,
mainTable
)
})
return div
} else {
Expand Down