Artifact support to link to workflow step
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 17
- Avg merge
- 3h 45m
- Merged PRs (30d)
- 220
Description
Task
Support on certain message artifacts the ability to link out the workflow url via a new tab
- MESSAGE_LINK_TO_WORKFLOW_FEATURE_FLAG .env based artifact
- Support
workflow_urlon message model (same level as message, taskId) - link out icon on message that has workflow_url
- support backend/frontend rendering of that variable ‘workflow_url’
- only show tab out, on hover of the message or artifact (e.g. longform) component in the top right?
Feature Flags
Simple .env-based feature flags with role-based access control.
Quick Setup
1. Create the utility
// src/lib/feature-flags.ts
2. Create the hook
// src/hooks/useFeatureFlag.ts
3. Add environment variables to .env
Usage
Components Example?
export function ChatFeature() {
const canAccessChat = useFeatureFlag('CHAT');
if (!canAccessChat) return null;
return <ChatInterface />;
}
// Navigation
export function Nav() {
const canAccessChat = useFeatureFlag('CHAT');
return (
<nav>
<NavItem href="/dashboard">Dashboard</NavItem>
{canAccessChat && <NavItem href="/chat">Chat</NavItem>}
</nav>
);
}
API Routes
// Check feature access in API routes
const userRole = workspace.members.find(m => m.userId === session?.user?.id)?.role;
if (!canAccessFeature('CHAT', userRole)) {
return NextResponse.json({ error: 'Feature not available' }, { status: 404 });
}
Pages
export default function ChatPage() {
const { role } = useWorkspace();
if (!canAccessFeature('CHAT', role)) {
return <AccessDenied message="Chat is admin-only" />;
}
return <ChatFeature />;
}
Adding New Features
- Add to
.env.local:FEATURE_NEW_THING=true - Use
useFeatureFlag('NEW_THING')in components
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the feature-flag locations named in the issue, src/lib/feature-flags.ts and src/hooks/useFeatureFlag.ts, then trace the message model and message or longform artifact components. Confirm how workflow_url is represented and rendered across the backend and frontend. Done means the flag controls the feature, messages with workflow_url show a hover-only external-link control, and messages without it remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100