fix(native): offer one "Files" row in the new-tab list
The editor type's page identity IS the `files` kind takeover (same explorer, same title), so the guide/new-tab list showed two identical "Files" entries — observed on a real profile after the takeover landed. The editor type now contributes no guide entry of its own; it stays registered as the file RESOURCE viewer. Covered by the registration lifecycle test (editor: no guide, files takeover: guide).
This commit is contained in:
@@ -160,7 +160,11 @@ export function registerNativeSurface(deps: NativeSurfaceDeps): () => void {
|
||||
// A resource tab is titled by the file it shows; a page tab keeps the
|
||||
// descriptor's own title.
|
||||
title: (address: string) => (isEditor ? fileTitleOf(address) ?? titleOf(descriptor) : titleOf(descriptor)),
|
||||
...(descriptor.hidden === true
|
||||
// No guide entry for the editor: its page identity is the `files`
|
||||
// kind takeover below (same view, same title), so listing both would
|
||||
// offer the reader two identical "Files" rows. The type itself stays
|
||||
// registered as the file RESOURCE viewer.
|
||||
...(descriptor.hidden === true || isEditor
|
||||
? {}
|
||||
: {
|
||||
guide: [{
|
||||
|
||||
Reference in New Issue
Block a user