Closed renatomassaro closed 6 years ago
Reviewed 28 of 31 files at r1, 5 of 5 files at r2. Review status: all files reviewed at latest revision, 8 unresolved discussions.
lib/core/listener/event/handler/listener.ex, line 20 at r2 (raw file):
""" def listener_handler(event) do # OPTMIZE: There's room for optimization on this function. Some events may
OPTIMIZE
(missing an i
). This is actually quite important because this is a tag, and project-wide ag
/grep
wouldn't find it.
lib/event/dispatcher.ex, line 245 at r2 (raw file):
StoryHandler.Story, :event_handler
Add this info to events.json
lib/software/process/file/transfer.ex, line 218 at r2 (raw file):
end # REVIEW: `upload` should use a `source_file`, no?
Review
lib/story/action/story.ex, line 130 at r2 (raw file):
{:ok, _, email} <- EmailInternal.send_reply(step, reply_id), {:ok, _} <- StepInternal.lock_reply(step, reply_id), {:ok, _} <- StepInternal.save_email(step, reply_id)
Maybe tag as OPTIMIZE
as well?
lib/story/event/handler/story.ex, line 124 at r2 (raw file):
end defp handle_action({:send_email, email_id, meta, opts}, step, _story_step) do
docp
lib/story/event/handler/story.ex, line 132 at r2 (raw file):
end defp handle_action({:send_reply, reply_id, opts}, step, story_step) do
docp
lib/story/event/handler/story.ex, line 208 at r2 (raw file):
end defp emit(event, from: source_event),
docp
lib/story/model/step/macros.ex, line 388 at r2 (raw file):
end [do: :complete, send_opts: send_opts] ->
Not do: complete
(conflicts with do: block
) OR not :complete
Comments from Reviewable
Reviewed 7 of 7 files at r3. Review status: all files reviewed at latest revision, all discussions resolved.
Comments from Reviewable
Reviewed 1 of 1 files at r4. Review status: all files reviewed at latest revision, all discussions resolved.
Comments from Reviewable
Most of this PR work was directed to making the Storyline message flow more flexible
[x] Add
Step.callback_actions
:{:send_email, email_id, email_meta, send_opts}
{:send_reply, reply_id, send_opts}
[x] Redesigned Steps to have
emails
andreplies
, both of which aremessages
(emails
may only be sent by the NPC, whilereplies
may only sent by the player).[x] New
reply
andon_email
macros[x] Clean up PoC implementation
[x] Doc everything
[x] Prepare the transition to the next step after
DownloadCracker
Incidental
Event.emit_after
with support forEvent.relay
Listenable
macros intolistenable/1
andlisten/2
.flush
helper onEvent.State.Timer
for testing and system restartsstory_listen
macro onStep.Macros
on_process_started
listener macro onStep.Macros
assert_reply/5
helper/macro forHelix.Test.Story.Macros
Listener.meta
has its keys automatically atomized for ease of use.This change is