the Flaming Skull of Welcome (#173)

This commit is contained in:
nora 2026-02-04 11:59:44 -05:00 committed by GitHub
parent 34b2246120
commit 742dbcb498
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 34 additions and 91 deletions

View file

@ -24,8 +24,6 @@ class Slack::InteractivityController < ActionController::API
action_id = action["action_id"]
case action_id
when "coc_continue"
Tutorial::CocContinueJob.perform_later(current_identity)
when "tutorial_agree"
Tutorial::AgreeJob.perform_later(current_identity)
else

View file

@ -1,7 +0,0 @@
class Tutorial::CocContinueJob < ApplicationJob
queue_as :default
def perform(identity)
RalseiEngine.send_first_message_part2(identity)
end
end

View file

@ -63,8 +63,7 @@ module OnboardingScenarios
# Each step maps to a template and optionally defines the next step
def dialogue_flow
{
intro: { template: "tutorial/01_intro", next: :hacker_values },
hacker_values: { template: "tutorial/02_hacker_values", next: :welcome },
intro: { template: "tutorial/intro", next: :welcome },
welcome: { template: "tutorial/03_welcome", next: nil }
}
end

View file

@ -1,6 +1,6 @@
module RalseiEngine
class << self
RALSEI_PFP = "https://hc-cdn.hel1.your-objectstorage.com/s/v3/6cc8caeeff906502bfe60ba2f3db34cdf79a237d_ralsei2.png"
RALSEI_PFP = "https://cdn.hackclub.com/019c2993-4a83-73d4-9e3a-96cf29881572/flaming_skull.jpg"
def send_first_message(identity)
scenario = identity.onboarding_scenario_instance
@ -9,8 +9,6 @@ module RalseiEngine
send_step(identity, first_step)
end
def send_first_message_part2(identity) = send_step(identity, :hacker_values)
def handle_tutorial_agree(identity)
Rails.logger.info "RalseiEngine: #{identity.public_id} agreed to tutorial"
scenario = identity.onboarding_scenario_instance
@ -98,7 +96,7 @@ module RalseiEngine
client.chat_postMessage(
channel: channel_id,
username: scenario&.bot_name || "Ralsei",
username: scenario&.bot_name || "The Flaming Skull of Welcome",
icon_url: scenario&.bot_icon_url || RALSEI_PFP,
**JSON.parse(payload, symbolize_names: true),
unfurl_links: false,

View file

@ -1,26 +0,0 @@
header "✨ Welcome to Hack Club!"
section "Hello, #{@identity.first_name}! I'm so glad you're here.\n\nFriend, please enjoy the tea and pie while you read this.", markdown: true
divider
section <<~EOCOC, markdown: true
_they point to a page in a book in front of you._
*_"The Tenets of the Hack Club Slack (abridged 15ᵗʰ ed.)"_, Orpheus et al.*
_handwritten in the margins, it says:_
> Be kind, thoughtful, and no advertisements.
_nearby, beautifully typeset:_
> *Hack Club Code of Conduct*, _a tl;dr version_:
> • Treat everyone with kindness and respect.
> • Be thoughtful in how you communicate.
> • Don't be destructive or inflammatory.
you can _(and should!)_ access the long-form version <https://hackclub.com/conduct/#hacker-values|here> if you like.
EOCOC
actions [
button("okay!", "coc_continue", style: "primary")
]

View file

@ -1,13 +0,0 @@
section <<~EOFD, markdown: true
_you can see I care very much about the wellbeing of everyone here._
if you ever have problems or concerns with another member of the community, please reach out to our confidential moderation team (made up primarily of teens!):
email conduct@hackclub.com or DM <@U07K4TS9HQE>.
EOFD
context [
mrkdwn_text("For posterity, you already agreed to Slack's <https://slack.com/main-services-agreement|Terms of Service> & <https://slack.com/trust/privacy/privacy-policy|Privacy Policy> on the way in.")
]
section '_Ralsei leans in._ "Do you vow to uphold the hacker values?"', markdown: true
actions [
button("hack yeah!", "tutorial_agree", style: "primary")
]

View file

@ -1,32 +1,16 @@
chan_announcements = Rails.configuration.slack_channels.announcements
chan_library = Rails.configuration.slack_channels.library
chan_ship = Rails.configuration.slack_channels.ship
chan_welcome = Rails.configuration.slack_channels.welcome
chan_welcome_to_hc = Rails.configuration.slack_channels.welcome_to_hack_club
chan_hq_eng = Rails.configuration.slack_channels.hq_eng
chan_neighbourhood = Rails.configuration.slack_channels.neighbourhood
case @identity.promote_click_count
when 0
header "🎉 welcome in!"
section <<~TEXT, markdown: true
And with that, you're now a full-fledged member of the Hack Club online community!
Great! The Code of Conduct is enforced by the Fire Department. DM <@U07K4TS9HQE> if you ever have a concern.
You feel a gentle warmth as countless friendly voices echo around you, and you notice a vast network of tunnels, channels, and rooms stretching peacefully into the distance. Your heart fills with quiet excitement. Ralsei adjusts his glasses and offers you a kind smile.
You now have access to all channels! Reload Slack to see them.
Oh! Um, if you'd like... I could show you some of my favorite places? I think you'll really like them!
TEXT
divider
section <<~TEXT, markdown: true
*<##{chan_announcements}>* is where you'll hear all the important news. It's very helpful!
*<##{chan_library}>* lets you explore all the wonderful channels and activity around Slack. There's so much to discover!
*<##{chan_ship}>* is where you can see amazing projects from people just like you! Everyone works so hard on them.
But most importantly... you simply _must_ introduce yourself in <##{chan_welcome}>*! There are so many kind and welcoming friends there who would love to meet you. You could tell them about yourself - who you are, what you enjoy doing, and anything else you'd like to share. Everyone's really nice, I promise! Don't be nervous - they'll be so happy you're here!
Visit <##{chan_welcome_to_hc}> for questions, advice, or just to introduce yourself!
TEXT
when 1
@ -35,7 +19,7 @@ when 1
section <<~TEXT, markdown: true
Oh! Um, it looks like you're already a full member of Hack Club! That's wonderful!
Ralsei adjusts his glasses and smiles warmly at you.
The Skull's flames flicker warmly.
I'm so glad you're here. How have you been enjoying the community? Have you made any new friends yet?
TEXT
@ -65,7 +49,7 @@ when 2
section <<~TEXT, markdown: true
Oh! You're back! That's okay, I don't mind at all.
Ralsei fidgets with his scarf a little nervously.
The Skull's flames flicker nervously.
Is everything alright? Did you need help finding something specific?
TEXT
@ -74,7 +58,7 @@ when 3
header "oh, hello!"
section <<~TEXT, markdown: true
Ralsei looks up from his book and smiles gently.
The Skull's eye sockets glow gently.
You keep coming back here! I hope that means you're enjoying Hack Club. Or... um, did you need something? I'm here if you want to talk!
@ -85,7 +69,7 @@ when 4
header "hi there..."
section <<~TEXT, markdown: true
Ralsei blinks and tilts his head slightly.
The Skull tilts slightly, flames flickering.
Oh! It's you again! Um... you know you're already a full member, right? The button doesn't do anything new after the first time...
@ -96,7 +80,7 @@ when 5
header "okay so..."
section <<~TEXT, markdown: true
Ralsei sets down his tea with a gentle *clink*.
The Skull sets down its tea with a gentle *clink*.
I really appreciate the visits, but... um... are you okay? Is the button stuck? Do you need me to get someone from <##{chan_hq_eng}> to help debug this?
@ -107,7 +91,7 @@ when 6
header "um."
section <<~TEXT, markdown: true
Ralsei adjusts his glasses and tries to maintain his composure.
The Skull's flames dim slightly as it tries to maintain composure.
Okay, I'm starting to think you're doing this on purpose now. Which is... fine! I'm not mad! I could never be mad at you!
@ -118,11 +102,11 @@ when 7
header "seriously?"
section <<~TEXT, markdown: true
Ralsei sighs softly and gives you a look that's somehow both exasperated and fond.
The Skull sighs softly, flames flickering with exasperation and fondness.
You're really committed to this bit, aren't you? I respect that, honestly.
*He takes a long sip of tea.*
*It takes a long sip of tea.*
At this point I think we're friends. Hi, friend. Please go make something cool and share it in <##{chan_ship}>. For me? 🥺
TEXT
@ -131,11 +115,11 @@ when 8
header "OKAY LISTEN—"
section <<~TEXT, markdown: true
Ralsei takes a deep breath and tries to stay calm.
The Skull takes a deep breath and tries to stay calm.
I'm a very patient person. I really am! But you've clicked this button NINE times now. NINE!
*He adjusts his hat nervously.*
*Its flames flicker nervously.*
I'm not angry! I'm just... concerned! Are you trapped in some kind of loop? Do you need help? Blink twice if you're being held hostage by the button!
@ -148,11 +132,11 @@ else
header "here we go again..."
section <<~TEXT, markdown: true
Ralsei looks up from his book with a knowing smile.
The Skull's eye sockets glow with a knowing warmth.
Oh! You're back again! At this point I think we should just schedule regular tea times together.
*He pours you an imaginary cup of tea.*
*It pours you an imaginary cup of tea.*
So... how's your day going? Made any cool projects lately? No? Just clicking buttons? That's okay too! 💚
TEXT
@ -161,7 +145,7 @@ else
header "my old friend!"
section <<~TEXT, markdown: true
Ralsei waves enthusiastically.
The Skull's flames wave enthusiastically.
Welcome back to the button-clicking dimension! Population: you and me!
@ -174,11 +158,11 @@ else
header "ah, there you are!"
section <<~TEXT, markdown: true
Ralsei doesn't even look surprised anymore.
The Skull doesn't even look surprised anymore.
You know what? I've given up trying to redirect you. This is your journey now. You're the Button Clicker. It's your destiny.
*He adjusts his scarf dramatically.*
*Its flames flare dramatically.*
I'm just here to provide moral support and the occasional reminder that you're already a full member. Which you are. Still. Forever. 💚
TEXT
@ -187,7 +171,7 @@ else
header "the prophecy continues..."
section <<~TEXT, markdown: true
Ralsei is now just casually reading a book.
The Skull is now just casually reading a book.
Oh hey. Yeah. You're already a member. Channels are over there. *gestures vaguely*
@ -200,7 +184,7 @@ else
header "one more time!"
section <<~TEXT, markdown: true
Ralsei sets down his book and smiles warmly.
The Skull sets down its book, flames glowing warmly.
You know what? I actually appreciate your dedication. In a world where people give up so easily, you've clicked this button #{@identity.promote_click_count + 1} times.

View file

@ -0,0 +1,10 @@
image "https://cdn.hackclub.com/019c297b-5d42-7256-a5e5-7d8f9f7adcd5/welcome.gif", "Welcome to Hack Club!"
section <<~EOFD, markdown: true
Right now you can only see <#C0A9PMV58R5>.
To access other channels, you must read and agree to our <https://hackclub.com/conduct|Code of Conduct>.
EOFD
actions [
button("I'll follow the CoC!", "tutorial_agree", style: "primary")
]