Skip to content

feat: gate agenda external app connectors behind VITE_SHOW_AGENDA_CONNECTORS#179

Open
BhuvanArn wants to merge 1 commit into
stagingfrom
205-feat-hide-agenda-connectors
Open

feat: gate agenda external app connectors behind VITE_SHOW_AGENDA_CONNECTORS#179
BhuvanArn wants to merge 1 commit into
stagingfrom
205-feat-hide-agenda-connectors

Conversation

@BhuvanArn

@BhuvanArn BhuvanArn commented Jul 15, 2026

Copy link
Copy Markdown
Owner

What type of PR is this? (check all applicable)

  • ✨ Feature
  • 🛑 Bug
  • ⚠️ Anomaly
  • 📝 Doc
  • 🎨 Style
  • 🧑‍💻 Refactor
  • 🛠️ Setup
  • 🏗️ Build
  • 🔥 Perfs
  • ✅ Test
  • 🔁 CI
  • ⏩ Revert

Description

Hides the Agenda page's Google/Apple connectors for the demo by gating them behind a VITE_SHOW_AGENDA_CONNECTORS env flag (default off). The connector code is kept, not deleted — set VITE_SHOW_AGENDA_CONNECTORS=true in web/.env to render it again.

Why. ExternalAppConnector (web/src/routes/agenda.tsx) offers Connect Google / Connect Apple, but no OAuth flow exists behind either button. Clicking runs a setTimeout(…, 500) and flips local React state to a "Connected" state that grants no calendar access, fetches no events, and does not survive a reload:

const handleConnectGoogle = () => {
  if (isGoogleConnected) {
    setIsGoogleConnected(false);
  } else {
    // Simulate API call delay
    setTimeout(() => setIsGoogleConnected(true), 500);
  }
};

It reads as a working integration while doing nothing — not something to demo.

How. Follows the existing VITE_SHOW_WS_DEBUG precedent (64ac7bf):

  • Render site gated on import.meta.env.VITE_SHOW_AGENDA_CONNECTORS === 'true'.
  • Flag declared in web/src/vite-env.d.ts, documented commented-out in web/.env.example.
  • Component doc comment now states the connection is simulated and grants no access.
  • New web/src/routes/-agenda.spec.tsx locks both states (hidden by default, rendered when the flag is on) so the gate cannot silently rot into a deletion.

Verification. Driven in a real browser against the local stack, not just tests:

Flag Result
unset (default) Connectors gone. Calendar, mini-calendar and next-event card all render. Sidebar drops 3 → 2 children, no layout gap.
=true Connectors return. Sidebar back to 3 children, both buttons present.

Zero console errors (the single warning is a pre-existing dependency-level JSX-transform notice, unrelated to this change). Gate: 1264 tests / 129 files pass, lint 0 warnings 0 errors, format clean, tsc -b clean.

Out of scope. The sidebar's "Link Integrations" row (web/src/components/organisms/sidebar/index.tsx) renders Google/LinkedIn icons with no onClick at all — decorative rather than fake-connected. Noted in #209 as its own ticket.

Linked GitHub Ticket

Relates to EpitechPromo2027/G-EIP-600-NAN-6-1-eip-tugdual.de-reviers#209

Workspace

  • 🖥️ Web
  • 🛠️ Server
  • 🔁 CI
  • 🤖 Ai
  • 📱 App

Screenshots

Verified in a real browser against the local stack (real backend on :8080), with the DOM asserted before each capture. Screenshots shared with the team directly rather than hosted from a scratch branch.

Default (flag unset) — connectors hidden: the "Connections" card is gone; calendar, mini-calendar and next-event card all render with no layout gap (Agenda sidebar drops from 3 children to 2).

image

With VITE_SHOW_AGENDA_CONNECTORS=true — connectors render again: the CONNECTIONS card returns with Connect Google and Connect Apple (sidebar back to 3 children).

image

Reproduce locally: VITE_SHOW_AGENDA_CONNECTORS=true npm run dev:web and open /agenda, then unset the flag and reload.

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
talk-up-ai-dev Ready Ready Preview, Comment Jul 15, 2026 11:39pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@railway-app

railway-app Bot commented Jul 16, 2026

Copy link
Copy Markdown

🚅 Deployed to the TalkUp.AI-pr-179 environment in talk-up-ai

Service Status Web Updated (UTC)
Backend ✅ Success (View Logs) Jul 15, 2026 at 11:40 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants