@@ -111,7 +111,13 @@ function renderSharedActionLinks(currentToolId) {
111111 return "" ;
112112 }
113113 const sourceToolId = currentToolId || HEADER_EXPANDED_FALLBACK_TOOL ;
114+ const visibleToolIds = new Set (
115+ getToolRegistry ( )
116+ . filter ( ( entry ) => entry . active === true && entry . visibleInToolsList === true )
117+ . map ( ( entry ) => entry . id )
118+ ) ;
114119 return getSharedShellActions ( sourceToolId , getPageMode ( ) )
120+ . filter ( ( action ) => ! action . targetToolId || ! visibleToolIds . has ( action . targetToolId ) )
115121 . map ( ( action ) => {
116122 const currentClass = action . current ? " is-current" : "" ;
117123 return `<a class="tools-platform-frame__action-link${ currentClass } " href="${ escapeHtml ( action . href ) } ">${ escapeHtml ( action . label ) } </a>` ;
@@ -147,6 +153,7 @@ function renderProjectSummary(currentTool) {
147153 const readiness = manifest ?. tools ?. [ currentTool . id ]
148154 ? "shared project state synced"
149155 : "shared project shell ready" ;
156+ const sharedSelectionSummary = renderSharedSelectionSummary ( ) ;
150157
151158 return `
152159 <div class="tools-platform-frame__project" aria-label="Project system controls">
@@ -163,12 +170,14 @@ function renderProjectSummary(currentTool) {
163170 <button type="button" class="tools-platform-frame__project-button is-secondary" data-project-action="close">Close Project</button>
164171 <input type="file" class="tools-platform-frame__project-input" data-project-open-input accept=".json,application/json" />
165172 </div>
173+ ${ sharedSelectionSummary }
166174 </div>
167175 ` ;
168176}
169177
170178function renderHeaderMarkup ( currentTool , isHeaderExpanded ) {
171179 const isLanding = getPageMode ( ) === "landing" ;
180+ const sharedActionLinks = ! isLanding ? renderSharedActionLinks ( currentTool ?. id ?? "" ) : "" ;
172181 const title = currentTool ? currentTool . displayName : ( document . body . dataset . toolTitle || "Tools Platform" ) ;
173182 const description = currentTool
174183 ? currentTool . description
@@ -199,10 +208,11 @@ function renderHeaderMarkup(currentTool, isHeaderExpanded) {
199208 </div>
200209 ${ renderProjectSummary ( currentTool ) }
201210 ${ ! isLanding ? `
202- <div class="tools-platform-frame__actions" aria-label="Shared asset and palette actions">
203- ${ renderSharedActionLinks ( currentTool ?. id ?? "" ) }
204- </div>
205- ${ renderSharedSelectionSummary ( ) }
211+ ${ sharedActionLinks ? `
212+ <div class="tools-platform-frame__actions" aria-label="Shared asset and palette actions">
213+ ${ sharedActionLinks }
214+ </div>
215+ ` : "" }
206216 ` : "" }
207217 </div>
208218 </section>
0 commit comments