Skip to content

tasks: TaskPage fails to render with error: "No apps found in task" #19101

@johnstcn

Description

@johnstcn

Problem

Some templates do not define any "embedded apps". You can still create a task with these apps, but attempting to visit the task page for this task will throw an error (only visible in console) "No apps found in task".

Context:

# TaskApps.tsx:L37-46
	const embeddedApps = apps.filter((app) => !app.external);
	const externalApps = apps.filter((app) => app.external);

	const [activeAppId, setActiveAppId] = useState<string>(() => {
		const appId = embeddedApps[0]?.id;
		if (!appId) {
			throw new Error("No apps found in task");
		}
		return appId;
	});

To reproduce this on dev.coder.com, use the template coder-aider@pensive_jackson2.

Workaround

Update the template.

Proposed Solution

It may make more sense to just not render the chat in the sidebar in this case.

Metadata

Metadata

Labels

tasksCoder tasks

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy